@toa.io/extensions.exposition 1.0.0-alpha.283 → 1.0.0-alpha.285

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (568) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/components/exposition.octets/types/index.d.ts +1 -1
  3. package/components/identity.bans/operations/transit.js +1 -1
  4. package/components/identity.bans/tsconfig.json +1 -1
  5. package/components/identity.bans/tsconfig.tsbuildinfo +1 -1
  6. package/components/identity.bans/types/index.d.ts +1 -1
  7. package/components/identity.basic/operations/add.js +1 -1
  8. package/components/identity.basic/operations/authenticate.js +1 -1
  9. package/components/identity.basic/operations/check.js +1 -1
  10. package/components/identity.basic/operations/delete.js +1 -1
  11. package/components/identity.basic/operations/incept.js +18 -2
  12. package/components/identity.basic/operations/info.js +1 -1
  13. package/components/identity.basic/operations/lib/credentials.js +1 -1
  14. package/components/identity.basic/operations/transit.js +1 -1
  15. package/components/identity.basic/source/incept.ts +29 -1
  16. package/components/identity.basic/tsconfig.json +1 -1
  17. package/components/identity.basic/tsconfig.tsbuildinfo +1 -1
  18. package/components/identity.basic/types/index.d.ts +3 -2
  19. package/components/identity.clients/operations/describe.js +1 -1
  20. package/components/identity.clients/operations/lib/Context.js +1 -1
  21. package/components/identity.clients/operations/lib/Entity.js +1 -1
  22. package/components/identity.clients/operations/lib/canonical.js +1 -1
  23. package/components/identity.clients/operations/lib/cimd.js +1 -1
  24. package/components/identity.clients/operations/lib/errors.js +1 -1
  25. package/components/identity.clients/operations/lib/index.js +1 -1
  26. package/components/identity.clients/operations/lib/redirect.js +1 -1
  27. package/components/identity.clients/operations/register.js +1 -1
  28. package/components/identity.clients/tsconfig.json +1 -1
  29. package/components/identity.clients/tsconfig.tsbuildinfo +1 -1
  30. package/components/identity.clients/types/index.d.ts +1 -1
  31. package/components/identity.credentials/operations/list.js +1 -1
  32. package/components/identity.credentials/tsconfig.json +4 -2
  33. package/components/identity.credentials/tsconfig.tsbuildinfo +1 -1
  34. package/components/identity.credentials/types/index.d.ts +1 -1
  35. package/components/identity.federation/operations/authenticate.js +7 -3
  36. package/components/identity.federation/operations/create.js +1 -1
  37. package/components/identity.federation/operations/decode.js +1 -1
  38. package/components/identity.federation/operations/delete.js +1 -1
  39. package/components/identity.federation/operations/incept.js +6 -2
  40. package/components/identity.federation/operations/lib/Configuration.js +1 -1
  41. package/components/identity.federation/operations/lib/Ctx.js +1 -1
  42. package/components/identity.federation/operations/lib/Payload.js +1 -1
  43. package/components/identity.federation/operations/lib/decode.js +1 -1
  44. package/components/identity.federation/operations/lib/discovery.js +1 -1
  45. package/components/identity.federation/operations/lib/errors.js +1 -1
  46. package/components/identity.federation/operations/lib/exchange.js +1 -1
  47. package/components/identity.federation/operations/lib/index.js +2 -1
  48. package/components/identity.federation/operations/lib/jose.js +1 -1
  49. package/components/identity.federation/operations/lib/principal.js +14 -0
  50. package/components/identity.federation/operations/lib/resolve.js +1 -1
  51. package/components/identity.federation/operations/list.js +1 -1
  52. package/components/identity.federation/operations/types/Scheme.js +1 -1
  53. package/components/identity.federation/operations/types/configuration.js +1 -1
  54. package/components/identity.federation/operations/types/context.js +1 -1
  55. package/components/identity.federation/operations/types/entity.js +1 -1
  56. package/components/identity.federation/operations/types/index.js +1 -1
  57. package/components/identity.federation/source/authenticate.ts +8 -2
  58. package/components/identity.federation/source/incept.ts +7 -1
  59. package/components/identity.federation/source/lib/index.ts +1 -0
  60. package/components/identity.federation/source/lib/principal.ts +17 -0
  61. package/components/identity.federation/source/types/context.ts +3 -0
  62. package/components/identity.federation/tsconfig.json +4 -2
  63. package/components/identity.federation/tsconfig.tsbuildinfo +1 -1
  64. package/components/identity.federation/types/index.d.ts +1 -1
  65. package/components/identity.grants/operations/authorize.js +1 -1
  66. package/components/identity.grants/operations/exchange.js +1 -1
  67. package/components/identity.grants/operations/lib/code.js +1 -1
  68. package/components/identity.grants/operations/lib/identify.js +1 -1
  69. package/components/identity.grants/operations/lib/index.js +1 -1
  70. package/components/identity.grants/operations/list.js +1 -1
  71. package/components/identity.grants/operations/revoke.js +1 -1
  72. package/components/identity.grants/tsconfig.json +1 -1
  73. package/components/identity.grants/tsconfig.tsbuildinfo +1 -1
  74. package/components/identity.grants/types/index.d.ts +1 -1
  75. package/components/identity.keys/operations/create.js +1 -1
  76. package/components/identity.keys/operations/disable.js +1 -1
  77. package/components/identity.keys/operations/revoke.js +1 -1
  78. package/components/identity.keys/tsconfig.json +1 -1
  79. package/components/identity.keys/tsconfig.tsbuildinfo +1 -1
  80. package/components/identity.keys/types/index.d.ts +1 -1
  81. package/components/identity.otp/operations/authenticate.js +1 -1
  82. package/components/identity.otp/operations/issue.js +1 -1
  83. package/components/identity.otp/operations/lib/Context.js +1 -1
  84. package/components/identity.otp/operations/lib/Entity.js +1 -1
  85. package/components/identity.otp/operations/lib/index.js +1 -1
  86. package/components/identity.otp/tsconfig.json +1 -1
  87. package/components/identity.otp/tsconfig.tsbuildinfo +1 -1
  88. package/components/identity.otp/types/index.d.ts +1 -1
  89. package/components/identity.passkeys/operations/authenticate.js +1 -1
  90. package/components/identity.passkeys/operations/challenge.js +1 -1
  91. package/components/identity.passkeys/operations/create.js +1 -1
  92. package/components/identity.passkeys/operations/delete.js +1 -1
  93. package/components/identity.passkeys/operations/lib/const.js +1 -1
  94. package/components/identity.passkeys/operations/list.js +1 -1
  95. package/components/identity.passkeys/operations/types/Configuration.js +1 -1
  96. package/components/identity.passkeys/operations/types/Context.js +1 -1
  97. package/components/identity.passkeys/operations/types/Passkey.js +1 -1
  98. package/components/identity.passkeys/operations/types/index.js +1 -1
  99. package/components/identity.passkeys/operations/use.js +1 -1
  100. package/components/identity.passkeys/tsconfig.json +1 -1
  101. package/components/identity.passkeys/tsconfig.tsbuildinfo +1 -1
  102. package/components/identity.passkeys/types/index.d.ts +1 -1
  103. package/components/identity.roles/operations/grant.js +1 -1
  104. package/components/identity.roles/operations/lib/Entity.js +1 -1
  105. package/components/identity.roles/operations/list.js +1 -1
  106. package/components/identity.roles/operations/principal.js +29 -5
  107. package/components/identity.roles/source/principal.ts +33 -5
  108. package/components/identity.roles/tsconfig.json +1 -1
  109. package/components/identity.roles/tsconfig.tsbuildinfo +1 -1
  110. package/components/identity.roles/types/index.d.ts +1 -1
  111. package/components/identity.tokens/operations/authenticate.js +1 -1
  112. package/components/identity.tokens/operations/decrypt.js +1 -1
  113. package/components/identity.tokens/operations/encrypt.js +1 -1
  114. package/components/identity.tokens/operations/issue.js +1 -1
  115. package/components/identity.tokens/operations/lib/form.js +1 -1
  116. package/components/identity.tokens/operations/lib/index.js +1 -1
  117. package/components/identity.tokens/operations/lib/jose.js +1 -1
  118. package/components/identity.tokens/operations/lib/key.js +1 -1
  119. package/components/identity.tokens/operations/lib/pad.js +1 -1
  120. package/components/identity.tokens/operations/revoke.js +1 -1
  121. package/components/identity.tokens/tsconfig.json +1 -1
  122. package/components/identity.tokens/tsconfig.tsbuildinfo +1 -1
  123. package/components/identity.tokens/types/index.d.ts +1 -1
  124. package/documentation/access.md +13 -0
  125. package/documentation/components.md +3 -0
  126. package/documentation/introspection.md +13 -5
  127. package/documentation/io.md +6 -0
  128. package/documentation/map.md +8 -0
  129. package/documentation/mcp.md +186 -0
  130. package/documentation/oauth.md +8 -7
  131. package/documentation/rpc.md +144 -0
  132. package/documentation/tree.md +3 -0
  133. package/features/identity.basic.feature +44 -0
  134. package/features/identity.federation.feature +2 -5
  135. package/features/introspection.feature +333 -0
  136. package/features/mcp.feature +691 -0
  137. package/features/oauth.discovery.feature +10 -11
  138. package/features/oauth.grants.feature +22 -9
  139. package/features/octets.cloudinary.feature +1 -0
  140. package/features/rpc.feature +429 -0
  141. package/features/steps/Cloudinary.ts +13 -0
  142. package/features/steps/Components.ts +0 -4
  143. package/features/steps/Gateway.ts +19 -2
  144. package/features/steps/Parameters.ts +18 -7
  145. package/features/steps/Realtime.ts +3 -0
  146. package/features/steps/components/echo/manifest.toa.yaml +1 -0
  147. package/features/steps/components/pots/manifest.toa.yaml +2 -0
  148. package/package.json +3 -3
  149. package/readme.md +3 -0
  150. package/schemas/annotation.cos.yaml +33 -0
  151. package/schemas/call.cos.yaml +18 -0
  152. package/source/Annotation.ts +31 -0
  153. package/source/Directive.test.ts +15 -15
  154. package/source/Directive.ts +77 -9
  155. package/source/Endpoint.test.ts +67 -0
  156. package/source/Endpoint.ts +31 -11
  157. package/source/Factory.ts +5 -1
  158. package/source/Gateway.ts +73 -11
  159. package/source/HTTP/Context.ts +7 -0
  160. package/source/HTTP/Server.ts +7 -1
  161. package/source/HTTP/exceptions.ts +2 -2
  162. package/source/HTTP/messages.ts +10 -1
  163. package/source/Introspection.ts +105 -0
  164. package/source/MCP/Server.ts +275 -0
  165. package/source/MCP/discover.ts +52 -0
  166. package/source/MCP/errors.ts +81 -0
  167. package/source/MCP/index.ts +1 -0
  168. package/source/MCP/schema.test.ts +85 -0
  169. package/source/MCP/schema.ts +87 -0
  170. package/source/MCP/tools.ts +157 -0
  171. package/source/MCP/types.ts +84 -0
  172. package/source/Query.ts +48 -8
  173. package/source/RPC/Context.ts +78 -0
  174. package/source/RPC/Dispatcher.ts +130 -0
  175. package/source/RPC/errors.test.ts +52 -0
  176. package/source/RPC/errors.ts +83 -0
  177. package/source/RPC/index.ts +1 -0
  178. package/source/RPC/names.test.ts +122 -0
  179. package/source/RPC/names.ts +183 -0
  180. package/source/RPC/types.ts +34 -0
  181. package/source/RTD/Directives.ts +52 -2
  182. package/source/RTD/Endpoint.ts +2 -1
  183. package/source/RTD/Method.ts +14 -11
  184. package/source/RTD/Node.ts +38 -7
  185. package/source/RTD/Route.ts +30 -3
  186. package/source/RTD/Tree.ts +37 -1
  187. package/source/RTD/expiration.test.ts +1 -1
  188. package/source/RTD/walk.test.ts +110 -0
  189. package/source/const.ts +15 -0
  190. package/source/deployment.ts +8 -1
  191. package/source/directives/auth/Anonymous.test.ts +38 -0
  192. package/source/directives/auth/Anonymous.ts +12 -0
  193. package/source/directives/auth/Anyone.ts +4 -0
  194. package/source/directives/auth/Authorization.ts +62 -3
  195. package/source/directives/auth/Delegate.test.ts +36 -0
  196. package/source/directives/auth/Delegate.ts +14 -0
  197. package/source/directives/auth/Echo.ts +5 -0
  198. package/source/directives/auth/Incept.ts +2 -1
  199. package/source/directives/auth/Role.ts +13 -0
  200. package/source/directives/auth/Rule.ts +29 -0
  201. package/source/directives/auth/Scheme.ts +5 -0
  202. package/source/directives/auth/types.ts +21 -0
  203. package/source/directives/cache/Cache.ts +1 -1
  204. package/source/directives/dev/Development.ts +1 -1
  205. package/source/directives/flow/Flow.ts +1 -1
  206. package/source/directives/index.ts +3 -1
  207. package/source/directives/io/Directive.ts +1 -1
  208. package/source/directives/io/IO.ts +32 -3
  209. package/source/directives/io/Input.ts +3 -2
  210. package/source/directives/io/Output.ts +6 -3
  211. package/source/directives/io/Status.test.ts +2 -2
  212. package/source/directives/io/Status.ts +1 -1
  213. package/source/directives/io/Throttle.ts +1 -1
  214. package/source/directives/io/lib/throttle/Quotas.ts +2 -2
  215. package/source/directives/map/Headers.ts +11 -0
  216. package/source/directives/map/Map.ts +10 -1
  217. package/source/directives/map/Mapping.ts +23 -0
  218. package/source/directives/map/Segments.ts +12 -0
  219. package/source/directives/mcp/MCP.ts +40 -0
  220. package/source/directives/mcp/Tool.test.ts +90 -0
  221. package/source/directives/mcp/Tool.ts +47 -0
  222. package/source/directives/mcp/index.ts +6 -0
  223. package/source/directives/oauth/Discovery.ts +10 -16
  224. package/source/directives/octets/Octets.ts +1 -1
  225. package/source/directives/require/Directive.ts +1 -1
  226. package/source/directives/require/Headers.ts +1 -1
  227. package/source/directives/require/Require.ts +2 -2
  228. package/source/schemas.ts +2 -0
  229. package/transpiled/Annotation.d.ts +24 -0
  230. package/transpiled/Directive.d.ts +18 -1
  231. package/transpiled/Directive.js +50 -6
  232. package/transpiled/Directive.js.map +1 -1
  233. package/transpiled/Endpoint.d.ts +9 -0
  234. package/transpiled/Endpoint.js +27 -11
  235. package/transpiled/Endpoint.js.map +1 -1
  236. package/transpiled/Factory.js +5 -1
  237. package/transpiled/Factory.js.map +1 -1
  238. package/transpiled/Gateway.d.ts +19 -2
  239. package/transpiled/Gateway.js +51 -9
  240. package/transpiled/Gateway.js.map +1 -1
  241. package/transpiled/HTTP/Context.d.ts +6 -0
  242. package/transpiled/HTTP/Context.js +6 -0
  243. package/transpiled/HTTP/Context.js.map +1 -1
  244. package/transpiled/HTTP/Server.d.ts +5 -1
  245. package/transpiled/HTTP/exceptions.d.ts +1 -1
  246. package/transpiled/HTTP/exceptions.js +2 -2
  247. package/transpiled/HTTP/exceptions.js.map +1 -1
  248. package/transpiled/HTTP/messages.d.ts +6 -0
  249. package/transpiled/HTTP/messages.js +9 -1
  250. package/transpiled/HTTP/messages.js.map +1 -1
  251. package/transpiled/Introspection.d.ts +42 -0
  252. package/transpiled/Introspection.js +50 -1
  253. package/transpiled/Introspection.js.map +1 -1
  254. package/transpiled/MCP/Server.d.ts +41 -0
  255. package/transpiled/MCP/Server.js +180 -0
  256. package/transpiled/MCP/Server.js.map +1 -0
  257. package/transpiled/MCP/discover.d.ts +13 -0
  258. package/transpiled/MCP/discover.js +29 -0
  259. package/transpiled/MCP/discover.js.map +1 -0
  260. package/transpiled/MCP/errors.d.ts +24 -0
  261. package/transpiled/MCP/errors.js +67 -0
  262. package/transpiled/MCP/errors.js.map +1 -0
  263. package/transpiled/MCP/index.d.ts +1 -0
  264. package/transpiled/MCP/index.js +2 -0
  265. package/transpiled/MCP/index.js.map +1 -0
  266. package/transpiled/MCP/schema.d.ts +18 -0
  267. package/transpiled/MCP/schema.js +64 -0
  268. package/transpiled/MCP/schema.js.map +1 -0
  269. package/transpiled/MCP/tools.d.ts +31 -0
  270. package/transpiled/MCP/tools.js +122 -0
  271. package/transpiled/MCP/tools.js.map +1 -0
  272. package/transpiled/MCP/types.d.ts +66 -0
  273. package/transpiled/MCP/types.js +13 -0
  274. package/transpiled/MCP/types.js.map +1 -0
  275. package/transpiled/Query.d.ts +7 -0
  276. package/transpiled/Query.js +38 -7
  277. package/transpiled/Query.js.map +1 -1
  278. package/transpiled/RPC/Context.d.ts +11 -0
  279. package/transpiled/RPC/Context.js +63 -0
  280. package/transpiled/RPC/Context.js.map +1 -0
  281. package/transpiled/RPC/Dispatcher.d.ts +19 -0
  282. package/transpiled/RPC/Dispatcher.js +100 -0
  283. package/transpiled/RPC/Dispatcher.js.map +1 -0
  284. package/transpiled/RPC/errors.d.ts +18 -0
  285. package/transpiled/RPC/errors.js +67 -0
  286. package/transpiled/RPC/errors.js.map +1 -0
  287. package/transpiled/RPC/index.d.ts +1 -0
  288. package/transpiled/RPC/index.js +2 -0
  289. package/transpiled/RPC/index.js.map +1 -0
  290. package/transpiled/RPC/names.d.ts +31 -0
  291. package/transpiled/RPC/names.js +121 -0
  292. package/transpiled/RPC/names.js.map +1 -0
  293. package/transpiled/RPC/types.d.ts +27 -0
  294. package/transpiled/RPC/types.js +8 -0
  295. package/transpiled/RPC/types.js.map +1 -0
  296. package/transpiled/RTD/Directives.d.ts +41 -2
  297. package/transpiled/RTD/Endpoint.d.ts +2 -1
  298. package/transpiled/RTD/Method.d.ts +8 -3
  299. package/transpiled/RTD/Method.js +12 -10
  300. package/transpiled/RTD/Method.js.map +1 -1
  301. package/transpiled/RTD/Node.d.ts +20 -2
  302. package/transpiled/RTD/Node.js +22 -4
  303. package/transpiled/RTD/Node.js.map +1 -1
  304. package/transpiled/RTD/Route.d.ts +2 -1
  305. package/transpiled/RTD/Route.js +27 -2
  306. package/transpiled/RTD/Route.js.map +1 -1
  307. package/transpiled/RTD/Tree.d.ts +3 -1
  308. package/transpiled/RTD/Tree.js +26 -0
  309. package/transpiled/RTD/Tree.js.map +1 -1
  310. package/transpiled/const.d.ts +12 -0
  311. package/transpiled/const.js +12 -0
  312. package/transpiled/const.js.map +1 -1
  313. package/transpiled/deployment.js +4 -0
  314. package/transpiled/deployment.js.map +1 -1
  315. package/transpiled/directives/auth/Anonymous.d.ts +6 -0
  316. package/transpiled/directives/auth/Anonymous.js +10 -0
  317. package/transpiled/directives/auth/Anonymous.js.map +1 -1
  318. package/transpiled/directives/auth/Anyone.d.ts +1 -0
  319. package/transpiled/directives/auth/Anyone.js +3 -0
  320. package/transpiled/directives/auth/Anyone.js.map +1 -1
  321. package/transpiled/directives/auth/Authorization.d.ts +27 -1
  322. package/transpiled/directives/auth/Authorization.js +49 -1
  323. package/transpiled/directives/auth/Authorization.js.map +1 -1
  324. package/transpiled/directives/auth/Delegate.d.ts +5 -0
  325. package/transpiled/directives/auth/Delegate.js +10 -0
  326. package/transpiled/directives/auth/Delegate.js.map +1 -1
  327. package/transpiled/directives/auth/Echo.d.ts +2 -0
  328. package/transpiled/directives/auth/Echo.js +4 -0
  329. package/transpiled/directives/auth/Echo.js.map +1 -1
  330. package/transpiled/directives/auth/Incept.js +2 -1
  331. package/transpiled/directives/auth/Incept.js.map +1 -1
  332. package/transpiled/directives/auth/Role.d.ts +2 -0
  333. package/transpiled/directives/auth/Role.js +9 -0
  334. package/transpiled/directives/auth/Role.js.map +1 -1
  335. package/transpiled/directives/auth/Rule.d.ts +5 -0
  336. package/transpiled/directives/auth/Rule.js +20 -0
  337. package/transpiled/directives/auth/Rule.js.map +1 -1
  338. package/transpiled/directives/auth/Scheme.d.ts +2 -0
  339. package/transpiled/directives/auth/Scheme.js +4 -0
  340. package/transpiled/directives/auth/Scheme.js.map +1 -1
  341. package/transpiled/directives/auth/types.d.ts +16 -0
  342. package/transpiled/directives/cache/Cache.d.ts +1 -1
  343. package/transpiled/directives/cache/Cache.js +1 -1
  344. package/transpiled/directives/cache/Cache.js.map +1 -1
  345. package/transpiled/directives/dev/Development.d.ts +1 -1
  346. package/transpiled/directives/dev/Development.js +1 -1
  347. package/transpiled/directives/dev/Development.js.map +1 -1
  348. package/transpiled/directives/flow/Flow.d.ts +1 -1
  349. package/transpiled/directives/flow/Flow.js +1 -1
  350. package/transpiled/directives/flow/Flow.js.map +1 -1
  351. package/transpiled/directives/index.js +2 -1
  352. package/transpiled/directives/index.js.map +1 -1
  353. package/transpiled/directives/io/Directive.d.ts +1 -1
  354. package/transpiled/directives/io/IO.d.ts +7 -1
  355. package/transpiled/directives/io/IO.js +23 -3
  356. package/transpiled/directives/io/IO.js.map +1 -1
  357. package/transpiled/directives/io/Input.d.ts +3 -2
  358. package/transpiled/directives/io/Input.js +2 -1
  359. package/transpiled/directives/io/Input.js.map +1 -1
  360. package/transpiled/directives/io/Output.d.ts +5 -3
  361. package/transpiled/directives/io/Output.js +4 -2
  362. package/transpiled/directives/io/Output.js.map +1 -1
  363. package/transpiled/directives/io/Status.d.ts +1 -1
  364. package/transpiled/directives/io/Status.js +1 -1
  365. package/transpiled/directives/io/Status.js.map +1 -1
  366. package/transpiled/directives/io/Throttle.d.ts +1 -1
  367. package/transpiled/directives/io/Throttle.js +1 -1
  368. package/transpiled/directives/io/Throttle.js.map +1 -1
  369. package/transpiled/directives/io/lib/throttle/Quotas.d.ts +1 -1
  370. package/transpiled/directives/io/lib/throttle/Quotas.js +2 -2
  371. package/transpiled/directives/io/lib/throttle/Quotas.js.map +1 -1
  372. package/transpiled/directives/map/Headers.d.ts +2 -0
  373. package/transpiled/directives/map/Headers.js +8 -0
  374. package/transpiled/directives/map/Headers.js.map +1 -1
  375. package/transpiled/directives/map/Map.d.ts +3 -1
  376. package/transpiled/directives/map/Map.js +7 -1
  377. package/transpiled/directives/map/Map.js.map +1 -1
  378. package/transpiled/directives/map/Mapping.d.ts +13 -0
  379. package/transpiled/directives/map/Mapping.js +20 -0
  380. package/transpiled/directives/map/Mapping.js.map +1 -1
  381. package/transpiled/directives/map/Segments.d.ts +3 -0
  382. package/transpiled/directives/map/Segments.js +9 -0
  383. package/transpiled/directives/map/Segments.js.map +1 -1
  384. package/transpiled/directives/mcp/MCP.d.ts +15 -0
  385. package/transpiled/directives/mcp/MCP.js +29 -0
  386. package/transpiled/directives/mcp/MCP.js.map +1 -0
  387. package/transpiled/directives/mcp/Tool.d.ts +18 -0
  388. package/transpiled/directives/mcp/Tool.js +34 -0
  389. package/transpiled/directives/mcp/Tool.js.map +1 -0
  390. package/transpiled/directives/mcp/index.d.ts +4 -0
  391. package/transpiled/directives/mcp/index.js +4 -0
  392. package/transpiled/directives/mcp/index.js.map +1 -0
  393. package/transpiled/directives/oauth/Discovery.js +10 -13
  394. package/transpiled/directives/oauth/Discovery.js.map +1 -1
  395. package/transpiled/directives/octets/Octets.d.ts +1 -1
  396. package/transpiled/directives/octets/Octets.js +1 -1
  397. package/transpiled/directives/octets/Octets.js.map +1 -1
  398. package/transpiled/directives/require/Directive.d.ts +1 -1
  399. package/transpiled/directives/require/Headers.d.ts +1 -1
  400. package/transpiled/directives/require/Headers.js +1 -1
  401. package/transpiled/directives/require/Headers.js.map +1 -1
  402. package/transpiled/directives/require/Require.d.ts +1 -1
  403. package/transpiled/directives/require/Require.js +2 -2
  404. package/transpiled/directives/require/Require.js.map +1 -1
  405. package/transpiled/schemas.d.ts +2 -0
  406. package/transpiled/schemas.js +1 -0
  407. package/transpiled/schemas.js.map +1 -1
  408. package/tsconfig.tsbuildinfo +1 -1
  409. package/components/identity.bans/operations/transit.d.ts +0 -14
  410. package/components/identity.bans/operations/transit.js.map +0 -1
  411. package/components/identity.basic/operations/add.d.ts +0 -3
  412. package/components/identity.basic/operations/add.js.map +0 -1
  413. package/components/identity.basic/operations/authenticate.d.ts +0 -13
  414. package/components/identity.basic/operations/authenticate.js.map +0 -1
  415. package/components/identity.basic/operations/check.d.ts +0 -7
  416. package/components/identity.basic/operations/check.js.map +0 -1
  417. package/components/identity.basic/operations/delete.d.ts +0 -7
  418. package/components/identity.basic/operations/delete.js.map +0 -1
  419. package/components/identity.basic/operations/incept.d.ts +0 -12
  420. package/components/identity.basic/operations/incept.js.map +0 -1
  421. package/components/identity.basic/operations/info.d.ts +0 -10
  422. package/components/identity.basic/operations/info.js.map +0 -1
  423. package/components/identity.basic/operations/lib/credentials.d.ts +0 -5
  424. package/components/identity.basic/operations/lib/credentials.js.map +0 -1
  425. package/components/identity.basic/operations/transit.d.ts +0 -15
  426. package/components/identity.basic/operations/transit.js.map +0 -1
  427. package/components/identity.clients/operations/describe.d.ts +0 -27
  428. package/components/identity.clients/operations/describe.js.map +0 -1
  429. package/components/identity.clients/operations/lib/Context.d.ts +0 -29
  430. package/components/identity.clients/operations/lib/Context.js.map +0 -1
  431. package/components/identity.clients/operations/lib/Entity.d.ts +0 -29
  432. package/components/identity.clients/operations/lib/Entity.js.map +0 -1
  433. package/components/identity.clients/operations/lib/canonical.d.ts +0 -11
  434. package/components/identity.clients/operations/lib/canonical.js.map +0 -1
  435. package/components/identity.clients/operations/lib/cimd.d.ts +0 -8
  436. package/components/identity.clients/operations/lib/cimd.js.map +0 -1
  437. package/components/identity.clients/operations/lib/errors.d.ts +0 -7
  438. package/components/identity.clients/operations/lib/errors.js.map +0 -1
  439. package/components/identity.clients/operations/lib/index.d.ts +0 -6
  440. package/components/identity.clients/operations/lib/index.js.map +0 -1
  441. package/components/identity.clients/operations/lib/redirect.d.ts +0 -10
  442. package/components/identity.clients/operations/lib/redirect.js.map +0 -1
  443. package/components/identity.clients/operations/register.d.ts +0 -37
  444. package/components/identity.clients/operations/register.js.map +0 -1
  445. package/components/identity.credentials/operations/list.d.ts +0 -52
  446. package/components/identity.credentials/operations/list.js.map +0 -1
  447. package/components/identity.federation/operations/authenticate.d.ts +0 -16
  448. package/components/identity.federation/operations/authenticate.js.map +0 -1
  449. package/components/identity.federation/operations/create.d.ts +0 -8
  450. package/components/identity.federation/operations/create.js.map +0 -1
  451. package/components/identity.federation/operations/decode.d.ts +0 -3
  452. package/components/identity.federation/operations/decode.js.map +0 -1
  453. package/components/identity.federation/operations/delete.d.ts +0 -8
  454. package/components/identity.federation/operations/delete.js.map +0 -1
  455. package/components/identity.federation/operations/incept.d.ts +0 -11
  456. package/components/identity.federation/operations/incept.js.map +0 -1
  457. package/components/identity.federation/operations/lib/Configuration.d.ts +0 -39
  458. package/components/identity.federation/operations/lib/Configuration.js.map +0 -1
  459. package/components/identity.federation/operations/lib/Ctx.d.ts +0 -8
  460. package/components/identity.federation/operations/lib/Ctx.js.map +0 -1
  461. package/components/identity.federation/operations/lib/Payload.d.ts +0 -5
  462. package/components/identity.federation/operations/lib/Payload.js.map +0 -1
  463. package/components/identity.federation/operations/lib/decode.d.ts +0 -3
  464. package/components/identity.federation/operations/lib/decode.js.map +0 -1
  465. package/components/identity.federation/operations/lib/discovery.d.ts +0 -5
  466. package/components/identity.federation/operations/lib/discovery.js.map +0 -1
  467. package/components/identity.federation/operations/lib/errors.d.ts +0 -77
  468. package/components/identity.federation/operations/lib/errors.js.map +0 -1
  469. package/components/identity.federation/operations/lib/exchange.d.ts +0 -3
  470. package/components/identity.federation/operations/lib/exchange.js.map +0 -1
  471. package/components/identity.federation/operations/lib/index.d.ts +0 -4
  472. package/components/identity.federation/operations/lib/index.js.map +0 -1
  473. package/components/identity.federation/operations/lib/jose.d.ts +0 -1
  474. package/components/identity.federation/operations/lib/jose.js.map +0 -1
  475. package/components/identity.federation/operations/lib/resolve.d.ts +0 -3
  476. package/components/identity.federation/operations/lib/resolve.js.map +0 -1
  477. package/components/identity.federation/operations/list.d.ts +0 -7
  478. package/components/identity.federation/operations/list.js.map +0 -1
  479. package/components/identity.federation/operations/types/Scheme.d.ts +0 -1
  480. package/components/identity.federation/operations/types/Scheme.js.map +0 -1
  481. package/components/identity.federation/operations/types/configuration.d.ts +0 -22
  482. package/components/identity.federation/operations/types/configuration.js.map +0 -1
  483. package/components/identity.federation/operations/types/context.d.ts +0 -36
  484. package/components/identity.federation/operations/types/context.js.map +0 -1
  485. package/components/identity.federation/operations/types/entity.d.ts +0 -9
  486. package/components/identity.federation/operations/types/entity.js.map +0 -1
  487. package/components/identity.federation/operations/types/index.d.ts +0 -4
  488. package/components/identity.federation/operations/types/index.js.map +0 -1
  489. package/components/identity.grants/operations/authorize.d.ts +0 -35
  490. package/components/identity.grants/operations/authorize.js.map +0 -1
  491. package/components/identity.grants/operations/exchange.d.ts +0 -37
  492. package/components/identity.grants/operations/exchange.js.map +0 -1
  493. package/components/identity.grants/operations/lib/code.d.ts +0 -15
  494. package/components/identity.grants/operations/lib/code.js.map +0 -1
  495. package/components/identity.grants/operations/lib/identify.d.ts +0 -6
  496. package/components/identity.grants/operations/lib/identify.js.map +0 -1
  497. package/components/identity.grants/operations/lib/index.d.ts +0 -3
  498. package/components/identity.grants/operations/lib/index.js.map +0 -1
  499. package/components/identity.grants/operations/list.d.ts +0 -13
  500. package/components/identity.grants/operations/list.js.map +0 -1
  501. package/components/identity.grants/operations/revoke.d.ts +0 -18
  502. package/components/identity.grants/operations/revoke.js.map +0 -1
  503. package/components/identity.keys/operations/create.d.ts +0 -22
  504. package/components/identity.keys/operations/create.js.map +0 -1
  505. package/components/identity.keys/operations/disable.d.ts +0 -5
  506. package/components/identity.keys/operations/disable.js.map +0 -1
  507. package/components/identity.keys/operations/revoke.d.ts +0 -15
  508. package/components/identity.keys/operations/revoke.js.map +0 -1
  509. package/components/identity.otp/operations/authenticate.d.ts +0 -12
  510. package/components/identity.otp/operations/authenticate.js.map +0 -1
  511. package/components/identity.otp/operations/issue.d.ts +0 -12
  512. package/components/identity.otp/operations/issue.js.map +0 -1
  513. package/components/identity.otp/operations/lib/Context.d.ts +0 -16
  514. package/components/identity.otp/operations/lib/Context.js.map +0 -1
  515. package/components/identity.otp/operations/lib/Entity.d.ts +0 -6
  516. package/components/identity.otp/operations/lib/Entity.js.map +0 -1
  517. package/components/identity.otp/operations/lib/index.d.ts +0 -1
  518. package/components/identity.otp/operations/lib/index.js.map +0 -1
  519. package/components/identity.passkeys/operations/authenticate.d.ts +0 -16
  520. package/components/identity.passkeys/operations/authenticate.js.map +0 -1
  521. package/components/identity.passkeys/operations/challenge.d.ts +0 -35
  522. package/components/identity.passkeys/operations/challenge.js.map +0 -1
  523. package/components/identity.passkeys/operations/create.d.ts +0 -19
  524. package/components/identity.passkeys/operations/create.js.map +0 -1
  525. package/components/identity.passkeys/operations/delete.d.ts +0 -8
  526. package/components/identity.passkeys/operations/delete.js.map +0 -1
  527. package/components/identity.passkeys/operations/lib/const.d.ts +0 -1
  528. package/components/identity.passkeys/operations/lib/const.js.map +0 -1
  529. package/components/identity.passkeys/operations/list.d.ts +0 -7
  530. package/components/identity.passkeys/operations/list.js.map +0 -1
  531. package/components/identity.passkeys/operations/types/Configuration.d.ts +0 -6
  532. package/components/identity.passkeys/operations/types/Configuration.js.map +0 -1
  533. package/components/identity.passkeys/operations/types/Context.d.ts +0 -16
  534. package/components/identity.passkeys/operations/types/Context.js.map +0 -1
  535. package/components/identity.passkeys/operations/types/Passkey.d.ts +0 -12
  536. package/components/identity.passkeys/operations/types/Passkey.js.map +0 -1
  537. package/components/identity.passkeys/operations/types/index.d.ts +0 -2
  538. package/components/identity.passkeys/operations/types/index.js.map +0 -1
  539. package/components/identity.passkeys/operations/use.d.ts +0 -16
  540. package/components/identity.passkeys/operations/use.js.map +0 -1
  541. package/components/identity.roles/operations/grant.d.ts +0 -10
  542. package/components/identity.roles/operations/grant.js.map +0 -1
  543. package/components/identity.roles/operations/lib/Entity.d.ts +0 -5
  544. package/components/identity.roles/operations/lib/Entity.js.map +0 -1
  545. package/components/identity.roles/operations/list.d.ts +0 -2
  546. package/components/identity.roles/operations/list.js.map +0 -1
  547. package/components/identity.roles/operations/principal.d.ts +0 -13
  548. package/components/identity.roles/operations/principal.js.map +0 -1
  549. package/components/identity.tokens/operations/authenticate.d.ts +0 -10
  550. package/components/identity.tokens/operations/authenticate.js.map +0 -1
  551. package/components/identity.tokens/operations/decrypt.d.ts +0 -16
  552. package/components/identity.tokens/operations/decrypt.js.map +0 -1
  553. package/components/identity.tokens/operations/encrypt.d.ts +0 -9
  554. package/components/identity.tokens/operations/encrypt.js.map +0 -1
  555. package/components/identity.tokens/operations/issue.d.ts +0 -25
  556. package/components/identity.tokens/operations/issue.js.map +0 -1
  557. package/components/identity.tokens/operations/lib/form.d.ts +0 -8
  558. package/components/identity.tokens/operations/lib/form.js.map +0 -1
  559. package/components/identity.tokens/operations/lib/index.d.ts +0 -4
  560. package/components/identity.tokens/operations/lib/index.js.map +0 -1
  561. package/components/identity.tokens/operations/lib/jose.d.ts +0 -1
  562. package/components/identity.tokens/operations/lib/jose.js.map +0 -1
  563. package/components/identity.tokens/operations/lib/key.d.ts +0 -1
  564. package/components/identity.tokens/operations/lib/key.js.map +0 -1
  565. package/components/identity.tokens/operations/lib/pad.d.ts +0 -1
  566. package/components/identity.tokens/operations/lib/pad.js.map +0 -1
  567. package/components/identity.tokens/operations/revoke.d.ts +0 -2
  568. package/components/identity.tokens/operations/revoke.js.map +0 -1
@@ -0,0 +1,691 @@
1
+ @security
2
+ Feature: Model Context Protocol
3
+
4
+ A tool is a procedure a method is published as. A method says so with `mcp:tool`, whose
5
+ value is what the tool is, and a default denies: a tree holds everything an application
6
+ serves and most of it is machinery a model has no business reading. What a tool takes and
7
+ answers is what the method says of itself, and what a caller may do with it is what `auth`
8
+ says.
9
+
10
+ What a tool is, is stated on the route and nowhere else. The operation states what it is
11
+ too, and that is not this: one operation mounted on two routes is two tools. A `title`
12
+ beside the description is what a person is shown where a client lists what it may call.
13
+
14
+ Two revisions are answered from one endpoint that remembers nothing between requests: the
15
+ modern one, where every request carries its own version and capabilities, and the one
16
+ before it, which opens with `initialize`. Neither is given a session, and neither is given
17
+ a stream.
18
+
19
+ Background:
20
+ Given the annotation:
21
+ """yaml
22
+ mcp:
23
+ name: Teapots
24
+ instructions: A pot is read by its id.
25
+ anonymous: true
26
+ """
27
+ And the `pots` is running with the following manifest:
28
+ """yaml
29
+ exposition:
30
+ /:
31
+ io:output: [id, title, volume]
32
+ GET:
33
+ mcp:tool: All the pots, newest first.
34
+ endpoint: enumerate
35
+ POST:
36
+ mcp:tool: Start a new pot brewing.
37
+ endpoint: create
38
+ /:id:
39
+ GET:
40
+ mcp:tool: One pot, by its id.
41
+ endpoint: observe
42
+ /large:
43
+ GET:
44
+ query:
45
+ criteria: volume>=100
46
+ mcp:tool:
47
+ title: Large pots
48
+ description: The pots that hold a hundred or more, newest first.
49
+ endpoint: enumerate
50
+ /unpublished:
51
+ GET: enumerate
52
+ /guarded:
53
+ isolated: true
54
+ GET:
55
+ auth:role: admin
56
+ mcp:tool: Every pot there is, for whoever may see them all.
57
+ endpoint: enumerate
58
+ """
59
+ And the `pots` database contains:
60
+ | _id | title | volume |
61
+ | 4c4759e6f9c74da989d64511df42d6f4 | First pot | 100 |
62
+
63
+ Scenario: What the server is
64
+ When the following request is received:
65
+ """
66
+ POST /.mcp HTTP/1.1
67
+ host: nex.toa.io
68
+ accept: application/yaml
69
+ content-type: application/json
70
+ mcp-protocol-version: 2026-07-28
71
+ mcp-method: server/discover
72
+
73
+ {"jsonrpc": "2.0", "id": 1, "method": "server/discover",
74
+ "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
75
+ "io.modelcontextprotocol/clientCapabilities": {}}}}
76
+ """
77
+ Then the following reply is sent:
78
+ """
79
+ 200 OK
80
+ cache-control: no-store
81
+
82
+ jsonrpc: '2.0'
83
+ id: 1
84
+ result:
85
+ supportedVersions:
86
+ - '2026-07-28'
87
+ - '2025-11-25'
88
+ capabilities:
89
+ tools: {}
90
+ instructions: A pot is read by its id.
91
+ ttlMs: 1800000
92
+ cacheScope: public
93
+ resultType: complete
94
+ """
95
+
96
+ Scenario: What a client of an earlier revision opens with
97
+ No session is made, and none is named back.
98
+
99
+ When the following request is received:
100
+ """
101
+ POST /.mcp HTTP/1.1
102
+ host: nex.toa.io
103
+ accept: application/yaml
104
+ content-type: application/json
105
+
106
+ {"jsonrpc": "2.0", "id": 1, "method": "initialize",
107
+ "params": {"protocolVersion": "2025-11-25", "capabilities": {},
108
+ "clientInfo": {"name": "Inspector", "version": "2.5.0"}}}
109
+ """
110
+ Then the following reply is sent:
111
+ """
112
+ 200 OK
113
+
114
+ jsonrpc: '2.0'
115
+ id: 1
116
+ result:
117
+ protocolVersion: '2025-11-25'
118
+ capabilities:
119
+ tools: {}
120
+ serverInfo:
121
+ name: Teapots
122
+ instructions: A pot is read by its id.
123
+ """
124
+ And the reply does not contain:
125
+ """
126
+ mcp-session-id
127
+ """
128
+ When the following request is received:
129
+ """
130
+ POST /.mcp HTTP/1.1
131
+ host: nex.toa.io
132
+ content-type: application/json
133
+
134
+ {"jsonrpc": "2.0", "method": "notifications/initialized"}
135
+ """
136
+ Then the following reply is sent:
137
+ """
138
+ 202 Accepted
139
+ """
140
+
141
+ Scenario: What the tools are
142
+ Every method that is published and the caller may reach. One the caller may not, and
143
+ one that is published as nothing at all, are both absent.
144
+
145
+ When the following request is received:
146
+ """
147
+ POST /.mcp HTTP/1.1
148
+ host: nex.toa.io
149
+ accept: application/yaml
150
+ content-type: application/json
151
+ mcp-protocol-version: 2026-07-28
152
+ mcp-method: tools/list
153
+
154
+ {"jsonrpc": "2.0", "id": 2, "method": "tools/list",
155
+ "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
156
+ "io.modelcontextprotocol/clientCapabilities": {}}}}
157
+ """
158
+ Then the following reply is sent:
159
+ """
160
+ 200 OK
161
+
162
+ jsonrpc: '2.0'
163
+ id: 2
164
+ result:
165
+ tools:
166
+ - name: pots.GET
167
+ description: All the pots, newest first.
168
+ inputSchema:
169
+ type: object
170
+ properties:
171
+ query:
172
+ type: object
173
+ properties:
174
+ criteria:
175
+ type: string
176
+ limit:
177
+ type: integer
178
+ minimum: 1
179
+ maximum: 100
180
+ default: 10
181
+ additionalProperties: false
182
+ annotations:
183
+ readOnlyHint: true
184
+ - name: pots.POST
185
+ description: Start a new pot brewing.
186
+ inputSchema:
187
+ type: object
188
+ properties:
189
+ title:
190
+ type: string
191
+ maxLength: 64
192
+ volume:
193
+ type: number
194
+ required:
195
+ - title
196
+ - volume
197
+ additionalProperties: false
198
+ - name: pots._id.GET
199
+ description: One pot, by its id.
200
+ inputSchema:
201
+ type: object
202
+ properties:
203
+ id:
204
+ type: string
205
+ required:
206
+ - id
207
+ additionalProperties: false
208
+ - name: pots.large.GET
209
+ title: Large pots
210
+ description: The pots that hold a hundred or more, newest first.
211
+ annotations:
212
+ readOnlyHint: true
213
+ ttlMs: 1800000
214
+ cacheScope: private
215
+ resultType: complete
216
+ """
217
+ And the reply does not contain:
218
+ """
219
+ pots.guarded.GET
220
+ """
221
+ And the reply does not contain:
222
+ """
223
+ pots.unpublished.GET
224
+ """
225
+ And the reply does not contain:
226
+ """
227
+ Put a pot on to brew.
228
+ """
229
+
230
+ Scenario: A method that is published as nothing is not called by guessing its name
231
+ A route the application did not publish is served over HTTP exactly as before. What it
232
+ does not have is a name here, and naming it anyway reaches nothing.
233
+
234
+ When the following request is received:
235
+ """
236
+ POST /.mcp HTTP/1.1
237
+ host: nex.toa.io
238
+ accept: application/yaml
239
+ content-type: application/json
240
+ mcp-protocol-version: 2026-07-28
241
+ mcp-method: tools/call
242
+ mcp-name: pots.unpublished.GET
243
+
244
+ {"jsonrpc": "2.0", "id": 30, "method": "tools/call",
245
+ "params": {"name": "pots.unpublished.GET", "arguments": {},
246
+ "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
247
+ "io.modelcontextprotocol/clientCapabilities": {}}}}
248
+ """
249
+ Then the following reply is sent:
250
+ """
251
+ 404 Not Found
252
+
253
+ jsonrpc: '2.0'
254
+ id: null
255
+ error:
256
+ code: -32601
257
+ """
258
+
259
+ Scenario: A credential does not hide an anonymous tool
260
+ A client here always presents one, and what refuses a credentialed request at an
261
+ `anonymous` route is that the reply would not be cacheable — which a tool's is not.
262
+
263
+ # developer:secret
264
+ Given the `identity.basic` database contains:
265
+ | _id | authority | username | password |
266
+ | efe3a65ebbee47ed95a73edd911ea328 | nex | developer | $2b$10$ZRSKkgZoGnrcTNA5w5eCcu3pxDzdTduhteVYXcp56AaNcilNkwJ.O |
267
+ And the `identity.bans` database is empty
268
+ When the following request is received:
269
+ """
270
+ POST /.mcp HTTP/1.1
271
+ host: nex.toa.io
272
+ authorization: Basic ZGV2ZWxvcGVyOnNlY3JldA==
273
+ accept: application/yaml
274
+ content-type: application/json
275
+ mcp-protocol-version: 2026-07-28
276
+ mcp-method: tools/list
277
+
278
+ {"jsonrpc": "2.0", "id": 20, "method": "tools/list",
279
+ "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
280
+ "io.modelcontextprotocol/clientCapabilities": {}}}}
281
+ """
282
+ Then the following reply is sent:
283
+ """
284
+ 200 OK
285
+
286
+ jsonrpc: '2.0'
287
+ id: 20
288
+ result:
289
+ tools:
290
+ - name: pots.GET
291
+ """
292
+
293
+ Scenario: A tool takes what the procedure takes
294
+ When the following request is received:
295
+ """
296
+ POST /.mcp HTTP/1.1
297
+ host: nex.toa.io
298
+ accept: application/yaml
299
+ content-type: application/json
300
+ mcp-protocol-version: 2026-07-28
301
+ mcp-method: tools/call
302
+ mcp-name: pots._id.GET
303
+
304
+ {"jsonrpc": "2.0", "id": 3, "method": "tools/call",
305
+ "params": {"name": "pots._id.GET",
306
+ "arguments": {"id": "4c4759e6f9c74da989d64511df42d6f4"},
307
+ "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
308
+ "io.modelcontextprotocol/clientCapabilities": {}}}}
309
+ """
310
+ Then the following reply is sent:
311
+ """
312
+ 200 OK
313
+
314
+ jsonrpc: '2.0'
315
+ id: 3
316
+ result:
317
+ structuredContent:
318
+ id: 4c4759e6f9c74da989d64511df42d6f4
319
+ title: First pot
320
+ volume: 100
321
+ resultType: complete
322
+ """
323
+
324
+ Scenario: What is left of the arguments is the input
325
+ When the following request is received:
326
+ """
327
+ POST /.mcp HTTP/1.1
328
+ host: nex.toa.io
329
+ accept: application/yaml
330
+ content-type: application/json
331
+ mcp-protocol-version: 2026-07-28
332
+ mcp-method: tools/call
333
+ mcp-name: pots.POST
334
+
335
+ {"jsonrpc": "2.0", "id": 4, "method": "tools/call",
336
+ "params": {"name": "pots.POST", "arguments": {"title": "Kettle", "volume": 1.7},
337
+ "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
338
+ "io.modelcontextprotocol/clientCapabilities": {}}}}
339
+ """
340
+ Then the following reply is sent:
341
+ """
342
+ 200 OK
343
+
344
+ jsonrpc: '2.0'
345
+ id: 4
346
+ result:
347
+ structuredContent:
348
+ id:
349
+ """
350
+
351
+ Scenario: A name nothing answers to
352
+
353
+ When the following request is received:
354
+ """
355
+ POST /.mcp HTTP/1.1
356
+ host: nex.toa.io
357
+ accept: application/yaml
358
+ content-type: application/json
359
+ mcp-protocol-version: 2026-07-28
360
+ mcp-method: tools/call
361
+ mcp-name: kettles.GET
362
+
363
+ {"jsonrpc": "2.0", "id": 5, "method": "tools/call",
364
+ "params": {"name": "kettles.GET", "arguments": {},
365
+ "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
366
+ "io.modelcontextprotocol/clientCapabilities": {}}}}
367
+ """
368
+ Then the following reply is sent:
369
+ """
370
+ 404 Not Found
371
+ """
372
+
373
+ Scenario: A method this server does not answer
374
+ The status is what tells a client that this endpoint is here and the method is not.
375
+
376
+ When the following request is received:
377
+ """
378
+ POST /.mcp HTTP/1.1
379
+ host: nex.toa.io
380
+ accept: application/yaml
381
+ content-type: application/json
382
+ mcp-protocol-version: 2026-07-28
383
+ mcp-method: prompts/list
384
+
385
+ {"jsonrpc": "2.0", "id": 6, "method": "prompts/list",
386
+ "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
387
+ "io.modelcontextprotocol/clientCapabilities": {}}}}
388
+ """
389
+ Then the following reply is sent:
390
+ """
391
+ 404 Not Found
392
+
393
+ jsonrpc: '2.0'
394
+ id: 6
395
+ error:
396
+ code: -32601
397
+ """
398
+
399
+ Scenario: A header saying one thing and a body another
400
+ What routes a request and what answers it must not be told two different things.
401
+
402
+ When the following request is received:
403
+ """
404
+ POST /.mcp HTTP/1.1
405
+ host: nex.toa.io
406
+ accept: application/yaml
407
+ content-type: application/json
408
+ mcp-protocol-version: 2026-07-28
409
+ mcp-method: tools/call
410
+ mcp-name: pots.GET
411
+
412
+ {"jsonrpc": "2.0", "id": 7, "method": "tools/call",
413
+ "params": {"name": "pots.POST", "arguments": {},
414
+ "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
415
+ "io.modelcontextprotocol/clientCapabilities": {}}}}
416
+ """
417
+ Then the following reply is sent:
418
+ """
419
+ 400 Bad Request
420
+
421
+ jsonrpc: '2.0'
422
+ id: 7
423
+ error:
424
+ code: -32020
425
+ """
426
+
427
+ Scenario: A revision neither served
428
+ When the following request is received:
429
+ """
430
+ POST /.mcp HTTP/1.1
431
+ host: nex.toa.io
432
+ accept: application/yaml
433
+ content-type: application/json
434
+ mcp-protocol-version: 1900-01-01
435
+ mcp-method: tools/list
436
+
437
+ {"jsonrpc": "2.0", "id": 8, "method": "tools/list", "params": {}}
438
+ """
439
+ Then the following reply is sent:
440
+ """
441
+ 400 Bad Request
442
+
443
+ jsonrpc: '2.0'
444
+ id: 8
445
+ error:
446
+ code: -32022
447
+ data:
448
+ supported:
449
+ - '2026-07-28'
450
+ - '2025-11-25'
451
+ requested: '1900-01-01'
452
+ """
453
+
454
+ Scenario: What the endpoint does not serve
455
+ A stream is what these were for, and this endpoint has none.
456
+
457
+ When the following request is received:
458
+ """
459
+ GET /.mcp HTTP/1.1
460
+ host: nex.toa.io
461
+ """
462
+ Then the following reply is sent:
463
+ """
464
+ 405 Method Not Allowed
465
+ allow: POST
466
+ """
467
+
468
+ Scenario: Without the annotation nothing answers there
469
+ Given the annotation:
470
+ """yaml
471
+ {}
472
+ """
473
+ When the following request is received:
474
+ """
475
+ POST /.mcp HTTP/1.1
476
+ host: nex.toa.io
477
+ content-type: application/json
478
+
479
+ {"jsonrpc": "2.0", "id": 9, "method": "tools/list", "params": {}}
480
+ """
481
+ Then the following reply is sent:
482
+ """
483
+ 404 Not Found
484
+ """
485
+
486
+ Scenario: A tool the caller may not call
487
+ What `auth` makes of a call is a refusal of the call, not of the credential: the model
488
+ named a record that is not the caller's, which it may correct itself by naming another.
489
+ A challenge here would send the client to ask for a scope that would not help.
490
+
491
+ # developer:secret, who is not an `admin` and so may not reach `pots.guarded.GET`
492
+ Given the `identity.basic` database contains:
493
+ | _id | authority | username | password |
494
+ | efe3a65ebbee47ed95a73edd911ea328 | nex | developer | $2b$10$ZRSKkgZoGnrcTNA5w5eCcu3pxDzdTduhteVYXcp56AaNcilNkwJ.O |
495
+ And the `identity.bans` database is empty
496
+ When the following request is received:
497
+ """
498
+ POST /.mcp HTTP/1.1
499
+ host: nex.toa.io
500
+ authorization: Basic ZGV2ZWxvcGVyOnNlY3JldA==
501
+ accept: application/yaml
502
+ content-type: application/json
503
+ mcp-protocol-version: 2026-07-28
504
+ mcp-method: tools/call
505
+ mcp-name: pots.guarded.GET
506
+
507
+ {"jsonrpc": "2.0", "id": 31, "method": "tools/call",
508
+ "params": {"name": "pots.guarded.GET", "arguments": {},
509
+ "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
510
+ "io.modelcontextprotocol/clientCapabilities": {}}}}
511
+ """
512
+ Then the following reply is sent:
513
+ """
514
+ 200 OK
515
+
516
+ jsonrpc: '2.0'
517
+ id: 31
518
+ result:
519
+ isError: true
520
+ """
521
+ And the reply does not contain:
522
+ """
523
+ insufficient_scope
524
+ """
525
+
526
+ Scenario: An argument the schemas would not take
527
+ What the arguments are refused for is the model's to correct by sending others, so it
528
+ is a result and not an error of the protocol.
529
+
530
+ When the following request is received:
531
+ """
532
+ POST /.mcp HTTP/1.1
533
+ host: nex.toa.io
534
+ accept: application/yaml
535
+ content-type: application/json
536
+ mcp-protocol-version: 2026-07-28
537
+ mcp-method: tools/call
538
+ mcp-name: pots._id.GET
539
+
540
+ {"jsonrpc": "2.0", "id": 32, "method": "tools/call",
541
+ "params": {"name": "pots._id.GET",
542
+ "arguments": {"id": "not-an-id"},
543
+ "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
544
+ "io.modelcontextprotocol/clientCapabilities": {}}}}
545
+ """
546
+ Then the following reply is sent:
547
+ """
548
+ 200 OK
549
+
550
+ jsonrpc: '2.0'
551
+ id: 32
552
+ result:
553
+ isError: true
554
+ """
555
+
556
+ Scenario: What the operation refused with
557
+ A refusal is a value a model reads and may correct itself by, so it is a result rather
558
+ than an error of the protocol.
559
+
560
+ Given the `echo` is running with the following manifest:
561
+ """yaml
562
+ exposition:
563
+ /:
564
+ io:output: true
565
+ GET:
566
+ mcp:tool: Refuses, with what it was given.
567
+ endpoint: error
568
+ """
569
+ When the following request is received:
570
+ """
571
+ POST /.mcp HTTP/1.1
572
+ host: nex.toa.io
573
+ accept: application/yaml
574
+ content-type: application/json
575
+ mcp-protocol-version: 2026-07-28
576
+ mcp-method: tools/call
577
+ mcp-name: echo.GET
578
+
579
+ {"jsonrpc": "2.0", "id": 10, "method": "tools/call",
580
+ "params": {"name": "echo.GET", "arguments": {},
581
+ "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
582
+ "io.modelcontextprotocol/clientCapabilities": {}}}}
583
+ """
584
+ Then the following reply is sent:
585
+ """
586
+ 200 OK
587
+
588
+ jsonrpc: '2.0'
589
+ id: 10
590
+ result:
591
+ content:
592
+ - type: text
593
+ text: message
594
+ isError: true
595
+ resultType: complete
596
+ """
597
+
598
+ Scenario: An operation that declares no output
599
+ A schema the revision would have the reply validated against is worse said emptily than
600
+ left unsaid — and the reply is answered all the same.
601
+
602
+ Given the `echo` is running with the following manifest:
603
+ """yaml
604
+ exposition:
605
+ /:
606
+ io:output: true
607
+ GET:
608
+ mcp:tool: Answers with what it was given.
609
+ endpoint: echo
610
+ """
611
+ When the following request is received:
612
+ """
613
+ POST /.mcp HTTP/1.1
614
+ host: nex.toa.io
615
+ accept: application/yaml
616
+ content-type: application/json
617
+ mcp-protocol-version: 2026-07-28
618
+ mcp-method: tools/call
619
+ mcp-name: echo.GET
620
+
621
+ {"jsonrpc": "2.0", "id": 11, "method": "tools/call",
622
+ "params": {"name": "echo.GET", "arguments": {"greeting": "hello"},
623
+ "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
624
+ "io.modelcontextprotocol/clientCapabilities": {}}}}
625
+ """
626
+ Then the following reply is sent:
627
+ """
628
+ 200 OK
629
+
630
+ jsonrpc: '2.0'
631
+ id: 11
632
+ result:
633
+ structuredContent:
634
+ greeting: hello
635
+ resultType: complete
636
+ """
637
+
638
+ Scenario: An origin that is not listed
639
+ The revision requires this against DNS rebinding, and an empty list admits none.
640
+
641
+ When the following request is received:
642
+ """
643
+ POST /.mcp HTTP/1.1
644
+ host: nex.toa.io
645
+ origin: https://elsewhere.example
646
+ accept: application/yaml
647
+ content-type: application/json
648
+ mcp-protocol-version: 2026-07-28
649
+ mcp-method: tools/list
650
+
651
+ {"jsonrpc": "2.0", "id": 12, "method": "tools/list",
652
+ "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
653
+ "io.modelcontextprotocol/clientCapabilities": {}}}}
654
+ """
655
+ Then the following reply is sent:
656
+ """
657
+ 403 Forbidden
658
+ """
659
+
660
+ Scenario: Without a credential
661
+ A request without one is where the authorization flow starts, so the refusal carries
662
+ the document that says where to get a token.
663
+
664
+ Given the annotation:
665
+ """yaml
666
+ authorities:
667
+ nex: nex.toa.io
668
+ oauth:
669
+ authorize: https://app.nex.toa.io/oauth/authorize
670
+ resources: ['/.mcp']
671
+ mcp:
672
+ name: Teapots
673
+ """
674
+ When the following request is received:
675
+ """
676
+ POST /.mcp HTTP/1.1
677
+ host: nex.toa.io
678
+ accept: application/yaml
679
+ content-type: application/json
680
+ mcp-protocol-version: 2026-07-28
681
+ mcp-method: tools/list
682
+
683
+ {"jsonrpc": "2.0", "id": 13, "method": "tools/list",
684
+ "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
685
+ "io.modelcontextprotocol/clientCapabilities": {}}}}
686
+ """
687
+ Then the following reply is sent:
688
+ """
689
+ 401 Unauthorized
690
+ www-authenticate: Bearer resource_metadata="https://nex.toa.io/.well-known/oauth-protected-resource/.mcp"
691
+ """