schema · growing

Anatomy of a server

Declare capabilities, answer list, handle call, return content. Smaller than it sounds.

A server is smaller than it sounds. It declares what it can do, then answers two kinds of call for each primitive: list them and do one.

what you actually implement
Declare capabilities
Answer tools/list
Handle tools/call
Return content
Validate input
Talk to the real system
Shape the result
Report errors as text

The shape of one tool

FieldWhy it matters
namestable identifier — renaming it breaks callers
descriptionthe only documentation the model reads
inputSchemaJSON Schema; the client can validate before calling
handleryour code — and the only place privileges are used

The hardest part of writing a server is not the protocol — the SDKs handle that. It is deciding what to expose and what to keep out of reach.

#server #sdk

See this note on the whiteboard →