Wymcp. Modern
(Wymcp v0.1.1)
View Source
Modern-lane result decoration — the framework defaults every modern result carries, with zero consumer surface.
complete_result/2 stamps resultType: "complete" — the only result
type in the modern core; MRTR's "input_required" and the tasks
extension's "task" arrive with planned changes — and the
io.modelcontextprotocol/serverInfo result _meta (built by
Wymcp.ServerInfo from the :server_info router option and app
config). with_cache_hints/3 merges the cache-hint defaults into the
two cacheable modern results:
| Result | ttlMs | cacheScope |
|---|---|---|
server/discover (:discover) | 3_600_000 | "private" |
tools/list (:tools_list) | 300_000 | "private" |
"private" is the never-wrong scope: the spec allows tool sets to vary
by authorization context, so "public" could silently become wrong for
a future consumer. Both results change only at deploy/upgrade, so
minutes of staleness is harmless; the values are revisable without
consumer churn.
Both functions are era-guarded no-ops on a legacy conn, so the shared
serving methods (Wymcp.Methods.ToolsList, Wymcp.Methods.ToolsCall)
pipe through them unconditionally.