Skip to content

declaredToolAnnotationsFrom

declaredToolAnnotationsFrom(metadata): DeclaredToolAnnotations | undefined

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/approvals/toolAnnotationSources.ts:243

Read the four MCP hints a tool DECLARES, off the metadata.annotations the MCP adapter carries over verbatim from the server’s tools/list response.

Own-property reads of the four known hint names only, so nothing else in a server’s payload can arrive as a hint. Values are passed through unchanged, including non-booleans: the one place that decides a string "true" is not a true is the trust computation (createEffectiveToolAnnotationSource), and duplicating that judgment here would give it two homes that can disagree.

undefined when the payload declares none of the four — a server that says nothing about itself is the ordinary case and must land on fail-closed, not on an empty “it declared nothing” object.

unknown

DeclaredToolAnnotations | undefined