Skip to content

0.14.1

Choose a tag to compare

@zaiev zaiev released this 31 Oct 09:26
· 20 commits to main since this release

Resources, templates and subscriptions/listen in spindle-mcp and spindle-mcp-client: a client can now read and watch what a server offers, through MCP alone.

New

  • Spindle_mcp.resource and Spindle_mcp.template, given to routes ~resources, are listed by resources/list and resources/templates/list and read by resources/read; a template is RFC 6570's {name} and a form-style query last, each variable read by its own description through Spindle_mcp.Template.
  • A resource's function answering Refusal.not_found or Access.forbidden is the resource not found, -32602, alike, so a read reveals nothing of someone else's object; a resource may need a scope, as a tool may.
  • Spindle_mcp.Changes, given to routes ~changes, serves subscriptions/listen: Changes.updated changes uri tells every listen watching that URI, which watches only URIs a read would answer for its caller, at most 64.
  • A listen is subscribed before it is acknowledged, ends with the graceful result when Changes.close ends it -- from on_stop -- and with none when it fell behind, so its client listens again.
  • Spindle_mcp_client.resources, templates and read list and read another server's resources; listen uris f hands f the acknowledgment and each change, ending Stopped, Completed or Dropped, and never listens again by itself.
  • Broadcast.dropped sub tells a subscriber dropped as slow from one unsubscribed or whose hub closed.
  • Spindle.Test.events takes ~meth and ~body, for a stream a POST opens, and Spindle_mcp.Test.events reads an MCP request's answer as an event stream.