Skip to main content
Glama

retract_pattern

Retract multiple facts matching a pattern using wildcard variables. Specify predicate and ?-prefixed arguments to remove all matching facts in one call. Returns count and list of retracted facts. Irreversible action.

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. Side effects: DESTRUCTIVE — removes multiple facts and cascades TMS retraction for each removed fact (irreversible). Auth: requires X-Tenant-ID header; FACT_WRITE permission when auth is enabled. Rate-limited per principal. Errors: VALIDATION_ERROR on bad args.

Input Schema

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

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

Despite no annotations, the description thoroughly discloses destructive side effects (irreversible removal with TMS cascading), authentication requirements (X-Tenant-ID and FACT_WRITE permission), rate limiting, and potential errors (VALIDATION_ERROR).

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 concise at four sentences, front-loading the main purpose, then providing structured details on usage, side effects, auth, and errors. Every sentence adds critical information without redundancy.

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?

Given no output schema and no annotations, the description covers all key aspects: behavior (destructive), return values (count and list), authentication, rate limiting, and error handling. It is fully informative for agent use.

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 coverage is 100%, with each parameter already described. The description adds value by explaining the wildcard convention and pattern matching, but does not significantly extend beyond schema details.

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 verb 'Retract' and the resource 'facts matching a pattern', with specific mention of using ?-prefixed wildcards. It distinguishes from sibling tools by emphasizing pattern-based retraction in a single call.

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 explains when to use (to retract multiple facts with wildcards) and how, but does not explicitly mention when not to use or provide comparisons to siblings like 'forget'. It gives clear context on wildcard usage.

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