Skip to content

Commit 0fe265d

Browse files
committed
MCP: mark detect read-only (was defaulting to destructive)
Unannotated MCP tools default to readOnlyHint:false/destructiveHint:true, so clients would gate detect behind confirmation. detect only fetches a domain's public surface — annotate it readonly + non-destructive + idempotent so clients can auto-run it.
1 parent f61cef6 commit 0fe265d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎worker/registry.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ const Detect = Tool.make("detect", {
1414
description: DETECT_DESCRIPTION,
1515
parameters: DetectParams,
1616
success: DetectionResult,
17-
});
17+
})
18+
// detect only fetches a domain's public surface — safe to auto-run.
19+
.annotate(Tool.Readonly, true)
20+
.annotate(Tool.Destructive, false)
21+
.annotate(Tool.Idempotent, true);
22+
// openWorldHint stays true (default): it reaches arbitrary external domains.
1823

1924
export const toolkit = Toolkit.make(Detect);
2025

0 commit comments

Comments
 (0)