Skip to main content
Glama

retract_pattern

Remove multiple facts matching a pattern using wildcards in one operation, with cascading retraction applied to each removed fact.

Instructions

Retract all facts matching a pattern in a single call. Use ?-prefixed variables as wildcards to retract multiple facts at once. Returns the count and list of retracted facts. Cascading retraction applies to each removed fact.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
predicateYesThe predicate pattern to match for retraction
argsYesArguments — use ?x as wildcards to match multiple facts
scopeNoOptional scope filter
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing key behavioral traits: it describes the return value ('count and list of retracted facts'), mentions 'cascading retraction' (implying side effects), and specifies the operation is destructive ('retract'). However, it does not cover potential errors, permissions, or rate limits.

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?

The description is front-loaded with the core purpose, followed by usage details and return information in three concise sentences. Every sentence earns its place by adding value, with no wasted words or redundancy.

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

Completeness4/5

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

Given the complexity of a destructive bulk operation with no annotations and no output schema, the description is mostly complete: it covers purpose, usage, parameters, and return values. However, it lacks details on error handling or the format of the returned list, which could be helpful for an agent.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters. The description adds some value by explaining how to use wildcards ('?-prefixed variables') for the 'args' parameter, but does not provide additional meaning beyond what the schema states for 'predicate' or 'scope'. Baseline 3 is appropriate as the schema does the heavy lifting.

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?

The description clearly states the specific action ('retract all facts matching a pattern'), identifies the resource ('facts'), and distinguishes from siblings like 'delete_scope' or 'forget' by emphasizing pattern-based bulk retraction. It explicitly mentions 'in a single call' to highlight efficiency.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('to retract multiple facts at once' with pattern matching), but does not explicitly state when not to use it or name alternatives among siblings like 'delete_scope' or 'forget'. It implies usage for bulk operations but lacks explicit exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Auctalis/nocturnusai'

If you have feedback or need assistance with the MCP directory API, please join our Discord server