main.bend fails
raw source on the hub · import ezmcp@0.1.0.0/main.bend as Main
ezmcp: Model Context Protocol servers and clients for Bend 2, revisions 2025-03-26, 2025-06-18 and 2025-11-25
A server is a name, a version, instructions and a tool table; a runner
(String -> Json -> IO(Rpc.Out)) runs a tool by name on its arguments and
answers ok of a tool result, or refuse with a JSON-RPC error. ezmcp serves it over streamable HTTP (on ezhttp)
or stdio, and answers initialize, ping, tools/list and tools/call itself.
The client side builds requests and reads replies over HTTP. This file is
the whole public interface; everything under src/ is internal, except the
types src/server.bend, src/rpc.bend and src/web.bend name.
9 imports
import Base import 0xa81e161008ecc2f297c0a3065cb9b188/src/value.bend as Value import 0xedb2120a04a47dc18c3a756ec7c62750/src/http.bend as Http import ./src/rpc.bend as Rpc import ./src/server.bend as Server import ./src/web.bend as Web import ./src/client.bend as Client import ./src/io.bend as Io import ./src/openapi.bend as Openapi
The reader could not load this file (at 0xe8a45a5d2dbc02504d10df4cabf172ea/src/server.bend:12). What bend.ts says:
Error:
- expected : a fresh name (duplicate declaration: Tool)
- observed : 'Tool'
Location:
11 | # one tool: its name, what it does, and the JSON Schema of its arguments
12>| type Tool is Data:
| ^^^^
13 | Tool{name: String, description: String, input: Value.Json}