Operations are an AST

An Endpoint is the typed description of one operation.

Method, path, inputs, outputs, errors, security, summary, tags, MCP promotion, hints. It is data. Api.bind attaches the function later. OpenAPI and MCP read EndpointDoc. HTTP runs decodeIn / encodeOut.

Write getShow

val getShow =
  Endpoint
    .get("shows" / int("id"))
    .out[Show]
    .outError[NotFound](Status.NotFound)
    .name("get_show")
    .summary("One bill")
    .hints(Hint.ReadOnly)

Api.job is explicit promotion. Heddle will not auto-export every REST operation as a tool. .inJson / .out need Schema and JsonCodec (derives Schema, JsonCodec on the domain type).

Click a field

Each field on EndpointDoc is read by a different interpreter. Click through them.

EndpointDoc · click a field
GET/shows/{id}.mcpReadOnly
read by

HTTP, OpenAPI, derived tool name

Next

Bind the effect is the only implementation.