Skip to content

Commit d13e05e

Browse files
authored
feat: using annotations (#79)
using annotations for readonly
1 parent d843543 commit d13e05e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/tools.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ const tools = {
1515
topN: z.number().default(1).describe('Maximum number of results'),
1616
namesOnly: z.boolean().default(false).describe('If true, only return definition names (for overview)')
1717
},
18+
annotations: {
19+
readOnlyHint: true,
20+
destructiveHint: false,
21+
idempotentHint: false
22+
},
1823
handler: async ({ projectPath, name, kind, topN, namesOnly }) => {
1924
const model = await getModel(projectPath)
2025
const defNames = kind
@@ -30,6 +35,11 @@ const tools = {
3035
},
3136
search_docs: {
3237
title: 'Search in CAP Documentation',
38+
annotations: {
39+
readOnlyHint: true,
40+
destructiveHint: false,
41+
idempotentHint: true
42+
},
3343
description:
3444
"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.",
3545
inputSchema: {

0 commit comments

Comments
 (0)