Assert a single tool advertises the full read-only contract from #1018.
(tool: ToolDefinition)
| 25 | |
| 26 | /** Assert a single tool advertises the full read-only contract from #1018. */ |
| 27 | function expectReadOnly(tool: ToolDefinition): void { |
| 28 | expect(tool.annotations, `${tool.name} is missing annotations`).toBeDefined(); |
| 29 | // The hint Cursor Ask mode (and other clients) gate on. |
| 30 | expect(tool.annotations!.readOnlyHint).toBe(true); |
| 31 | // The exact triplet the issue asks for, plus the honest closed-world hint. |
| 32 | expect(tool.annotations!.destructiveHint).toBe(false); |
| 33 | expect(tool.annotations!.idempotentHint).toBe(true); |
| 34 | expect(tool.annotations!.openWorldHint).toBe(false); |
| 35 | } |
| 36 | |
| 37 | describe('Read-only annotations on the codegraph MCP tools (#1018)', () => { |
| 38 | const original = process.env[ENV]; |
no outgoing calls
no test coverage detected