Skip to content

Commit fe796e1

Browse files
authored
feat: Add missing destructiveHint annotations to tools (#380)
Complete the tool annotation coverage by adding destructiveHint: - Abort Actor run: destructiveHint=true (terminates running processes) - Add tool: destructiveHint=false (additive - registers new tools) - Call Actor: destructiveHint=false (creates new runs) - Dynamic Actor tools: destructiveHint=false (executes actors) This completes the MCP tool annotation coverage for the project, helping LLMs better understand tool behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: triepod-ai <[email protected]>
1 parent 450c0fb commit fe796e1

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

src/tools/actor.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ Actor description: ${definition.description}`;
202202
: undefined,
203203
annotations: {
204204
title: definition.actorFullName,
205+
destructiveHint: false,
205206
openWorldHint: true,
206207
},
207208
// Allow long running tasks for Actor tools, make it optional for now
@@ -395,6 +396,7 @@ EXAMPLES:
395396
}),
396397
annotations: {
397398
title: 'Call Actor',
399+
destructiveHint: false,
398400
openWorldHint: true,
399401
},
400402
call: async (toolArgs: InternalToolArgs) => {

src/tools/helpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ USAGE EXAMPLES:
2828
ajvValidate: compileSchema(z.toJSONSchema(addToolArgsSchema)),
2929
annotations: {
3030
title: 'Add tool',
31+
destructiveHint: false,
3132
openWorldHint: true,
3233
},
3334
// TODO: I don't like that we are passing apifyMcpServer and mcpServer to the tool

src/tools/run.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ USAGE EXAMPLES:
119119
ajvValidate: compileSchema(z.toJSONSchema(abortRunArgs)),
120120
annotations: {
121121
title: 'Abort Actor run',
122+
destructiveHint: true,
122123
openWorldHint: false,
123124
},
124125
call: async (toolArgs: InternalToolArgs) => {

0 commit comments

Comments
 (0)