def capabilities

ezmcp@0.1.0.0 · src/server.bend:114

import ezmcp@0.1.0.0/src/server.bend as Server
import Base
import emerging-ezjson@1.2.0.0/main.bend as Json
import emerging-ezjson@1.2.0.0/src/value.bend as Value

114# the capabilities a tool table declares: tools when there is one, with
115# listChanged false, since the table never changes
116def capabilities(tools: List<&2, Tool>) -> Value.Json:
117  match tools:
118    case []:
119      Json.obj([])
120    case t <> rest:
121      Json.obj([("tools", Json.obj([("listChanged", Json.bool(False{}))]))])

Uses (7)

Used by (1)