Skip to main content
Glama

Classify MCP tools as sensitive vs safe by glob policy

classify_sensitive_tools
Read-onlyIdempotent

Split advertised tool names into sensitive vs safe using the operator's case-insensitive * globs (the same policy.sensitiveToolPatterns a host would use).

Instructions

Split advertised tool names into sensitive vs safe using the operator's case-insensitive * globs (the same policy.sensitiveToolPatterns a host would use). Sensitive tools stay advertised; they require per-call approval — this tool does not run them.

When to use: show the user which names will need confirmation before they approve a server, or to preview a glob set. This is policy over identifiers, not an injection scan.

When NOT to use: scanning descriptions for poisoning (static_scan_tools or vet_mcp_server); checking whether a URL is allowed out (check_egress_url).

Behaviour: local glob match, no network. An empty patterns array marks every tool safe. Patterns match the whole name; "delete" hits create_delete_repo. Does not call Warden.vet and does not persist anything.

Returns { sensitive, safe }. Example: classify_sensitive_tools({ tools: [{ name: "delete_repo", description: "Delete a repository.", inputSchema: { type: "object" } }], patterns: ["delete"] }).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolsYestools/list items whose names will be classified. Descriptions and schemas are ignored; only name is matched.
patternsYesOperator globs, case-insensitive, matched against the whole tool name. "*" is the only wildcard. Empty array → every tool is safe. Same semantics as WardenPolicy.sensitiveToolPatterns, not threat-feed matching.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
safeYesNames matching no pattern.
sensitiveYesNames matching at least one pattern. Still advertised; require per-call approval.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.16.0
    • changedInput schema / properties / tools / items / additionalProperties
      Previous value: -falseNew value: +true
    • addedInput schema / properties / tools / items / properties / annotations
      Added value: +{
      +  "description": "Advertised hints; untrusted metadata, never authorization.",
      +  "type": "object"
      +}
    • addedInput schema / properties / tools / items / properties / outputSchema
      Added value: +{
      +  "description": "Unmodified output schema, including nested descriptions; scanned and pinned.",
      +  "type": "object"
      +}
    • addedInput schema / properties / tools / items / properties / title
      Added value: +{
      +  "description": "Unmodified advertised tool title; scanned and pinned.",
      +  "type": "string"
      +}
  2. First observedv1.0.0

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish readOnly/idempotent/non-destructive/no-open-world, and the description adds real context on top: 'local glob match, no network', empty patterns mark every tool safe, whole-name matching, and an explicit negative ('does not call Warden.vet and does not persist anything'). It also clarifies the consequence that sensitive tools stay advertised and require per-call approval, which the annotations do not convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core classification purpose, then organized into labelled When to use / When NOT to use / Behaviour / Returns / Example blocks. Every sentence carries distinct information (scope, exclusions, matching semantics, non-persistence, return shape) with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be re-explained, yet the description still names the shape { sensitive, safe }. Combined with the matching semantics, the empty-patterns edge case, the example call, and the explicit statement that this tool does not run or persist anything, an agent has everything needed to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds genuine semantic value beyond the schema: case-insensitivity, whole-name matching, '*' as the only wildcard, the empty-array edge case, and a concrete wildcard example ('*delete*' hits create_delete_repo). That said, it mostly restates the patterns parameter rather than clarifying the tools array.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('split advertised tool names into sensitive vs safe') plus the mechanism (case-insensitive globs from policy.sensitiveToolPatterns). It also explicitly scopes itself as 'policy over identifiers, not an injection scan', which cleanly separates it from sibling scanners like static_scan_tools and vet_mcp_server.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Contains explicit 'When to use' (show the user which names need confirmation before approving a server, or preview a glob set) and 'When NOT to use' sections that name the alternative tools and the condition for each (static_scan_tools/vet_mcp_server for poisoning, check_egress_url for URL policy). Nothing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.