From 6f881e9ded09d073dd5ab2faf9186921561927f7 Mon Sep 17 00:00:00 2001 From: David Kunz Date: Fri, 24 Oct 2025 10:43:02 +0200 Subject: [PATCH] using annotations for readonly --- lib/tools.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/tools.js b/lib/tools.js index a70a71c..6057477 100644 --- a/lib/tools.js +++ b/lib/tools.js @@ -15,6 +15,11 @@ const tools = { topN: z.number().default(1).describe('Maximum number of results'), namesOnly: z.boolean().default(false).describe('If true, only return definition names (for overview)') }, + annotations: { + readOnlyHint: true, + destructiveHint: false, + idempotentHint: false + }, handler: async ({ projectPath, name, kind, topN, namesOnly }) => { const model = await getModel(projectPath) const defNames = kind @@ -30,6 +35,11 @@ const tools = { }, search_docs: { title: 'Search in CAP Documentation', + annotations: { + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true + }, description: "Searches code snippets of CAP documentation for the given query. You MUST use this tool if you're unsure about CAP APIs for CDS, Node.js or Java. Optionally returns only code blocks.", inputSchema: {