Skip to main content
Glama

extract_rules_tool

Extract L3 declarative rules from frequently accessed notes into memory/rules.md, then auto-inject them into context so Claude sees key project constraints.

Instructions

Extract L3 declarative rules from high-access notes into memory/rules.md.

Rules are auto-injected at the top of every get_context() call so Claude always has the most important project constraints in view.

Args: note_path: Specific note to extract from (e.g. 'decisions/my-note.md'). Leave empty to run batch extraction on all eligible notes (access_count >= 5, not extracted in last 90 days).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
note_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description must carry the behavioral burden. It discloses the key side-effect (writing to memory/rules.md) and the downstream effect (rules auto-injected at the top of every get_context() call), which is valuable context beyond the schema.

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

Conciseness4/5

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

Front-loads the purpose and file target, followed by the important downstream effect and parameter details. The two-sentence preamble is efficient, though the Args block uses slightly more space than strictly necessary.

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 an output schema exists, return values needn't be explained. The description covers what the tool does, where it writes, the batch eligibility criteria, and param behavior — enough for an agent to invoke it correctly despite no annotations.

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 description coverage is 0%, but the one parameter is well-explained: note_path accepts a path like 'decisions/my-note.md' and an empty value triggers batch mode with clear eligibility rules. The description compensates for the lack of schema descriptions.

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 (extract) and a precise resource (L3 declarative rules from high-access notes into memory/rules.md). The description makes clear this writes to a specific file and what kind of rules are involved, distinguishing it from siblings like read_note or search_notes.

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?

Specifies the eligibility criteria for batch mode (access_count >= 5, not extracted in last 90 days) and the single-note mode. However, it doesn't explicitly state when to prefer a single-note extraction over a batch run, or name alternatives like consolidate_tool.

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