Commit a078d4f
authored
feat(tools): add idempotentHint + openWorldHint annotations to all 12 tools (R3 F39) (#42)
R3 § 4 Bundle 2 finding F39: tool annotations were missing
`idempotentHint`, `openWorldHint`, and `title`. Non-Claude MCP clients
(GPT-4, Gemini, Kimi, DeepSeek via Cursor/ChatGPT/Codex/etc.) reason
about side-effect classes using these annotations before invoking;
without them, those models fall back to conservative defaults (refuse,
ask, escalate) — degrading UX.
This PR adds `idempotentHint` and `openWorldHint` to all 12 tools.
`title` was already present at the top level of every tool definition,
so no `title` changes were needed.
Per CLAUDE.md verb-pattern table + MCP 2025-06-18 spec semantics:
| Verb | readOnly | destructive | idempotent | openWorld |
|------------|----------|-------------|------------|-----------|
| list*, get*| true | false | true | false |
| reserve* | false | false | false | false |
| upload* | false | false | false | false |
| confirm* | false | false | true | false |
| terminate* | false | true | false | false |
`openWorldHint: false` is uniform across all 12 tools — the Kobiton
MCP server is a bounded API surface (`api.kobiton.com/mcp`), not an
"open world" like web search or arbitrary HTTP fetch.
`idempotentHint` values derive from MCP/HTTP idempotency semantics
("no additional effect after first request"). `confirmAppUpload` is
idempotent because the second call after a successful first call sees
the existing app record rather than creating a new one (consistent with
R2 finding F5/F25 observations); but `uploadAppToStore` is NOT
idempotent because it allocates a fresh S3 pre-signed URL per call.
Tools touched (all 12):
- tools/devices.yaml: listDevices, getDeviceStatus, reserveDevice,
terminateReservation
- tools/sessions.yaml: listSessions, getSession, getSessionArtifacts,
terminateSession
- tools/apps.yaml: listApps, uploadAppToStore, confirmAppUpload, getApp
`outputSchema` per tool is NOT included in this PR — adding outputSchema
without evidence of the actual server response shape would be
speculative. Defer to a follow-up PR backed by empirical response
captures (test-runs/ has the raw JSON dumps from the R2 experiment
campaign that can ground outputSchemas accurately).
Cross-references:
- R3 § 4 Bundle 2 fork issue #26
- MCP spec primitives: modelcontextprotocol.io/specification/2025-06-18/server/tools
Validation:
- `pnpm run validate` passes
- `pnpm test` passes (22 tests)
- `validate-skills-schema.py --enterprise` — 0 ERRORs (all pre-existing
WARNs unchanged); Skills: 1, Agents: 3; 91/100 average
Signed-off-by: jeremylongshore <jeremylongshore@users.noreply.github.com>
Co-authored-by: jeremylongshore <jeremylongshore@users.noreply.github.com>1 parent a112fd9 commit a078d4f
3 files changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| 86 | + | |
| 87 | + | |
82 | 88 | | |
83 | 89 | | |
84 | 90 | | |
| |||
106 | 112 | | |
107 | 113 | | |
108 | 114 | | |
| 115 | + | |
| 116 | + | |
109 | 117 | | |
110 | 118 | | |
111 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| 64 | + | |
| 65 | + | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
| |||
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
| 91 | + | |
| 92 | + | |
87 | 93 | | |
88 | 94 | | |
89 | 95 | | |
| |||
112 | 118 | | |
113 | 119 | | |
114 | 120 | | |
| 121 | + | |
| 122 | + | |
115 | 123 | | |
116 | 124 | | |
117 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| |||
91 | 95 | | |
92 | 96 | | |
93 | 97 | | |
| 98 | + | |
| 99 | + | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
| |||
114 | 120 | | |
115 | 121 | | |
116 | 122 | | |
| 123 | + | |
| 124 | + | |
117 | 125 | | |
118 | 126 | | |
119 | 127 | | |
| |||
0 commit comments