Skip to main content
Glama

inject_claude_md

Write rule-level patterns into CLAUDE.md files by updating only the designated block between markers, preserving other content and creating the file if needed.

Instructions

Idempotently write rule-level patterns into a CLAUDE.md file.

    Updates only the block between <!-- instinct:start --> and
    <!-- instinct:end --> markers; everything else in the file is
    preserved. Creates the file (and markers) if they do not exist.
    Safe to run on every commit or session end without producing churn.

    For one-shot rendering without touching the filesystem, use
    export_claude_md() and write the output yourself.

    Args:
        target: Absolute or relative path to the CLAUDE.md file. Parent
            directories must exist; the file itself will be created.

    Returns:
        Dict with keys: "target" (str — echoed path), "rule_count"
        (int), "changed" (bool — false when content matched existing
        block, true when the file was actually rewritten).
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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 of behavioral disclosure and does so effectively. It explains idempotency, file creation behavior, marker handling, and safety characteristics. It doesn't mention error conditions or performance characteristics, but covers the essential behavioral traits for this operation.

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 perfectly structured and front-loaded with the core purpose, followed by behavioral details, usage guidelines, and parameter documentation. Every sentence earns its place, with no redundant information. The formatting with clear sections enhances readability without sacrificing conciseness.

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 the tool's complexity (file manipulation with idempotent updates), no annotations, and an output schema that documents return values, the description provides complete context. It covers purpose, behavior, usage scenarios, parameter semantics, and references the output structure, leaving no significant gaps for agent understanding.

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

Parameters5/5

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

With 0% schema description coverage and only one parameter, the description provides comprehensive semantic context beyond the bare schema. It explains that 'target' accepts absolute or relative paths, clarifies parent directory requirements, and specifies that the file itself will be created if needed. This fully compensates for the schema's lack of 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?

The description clearly states the specific action ('idempotently write rule-level patterns') and target resource ('CLAUDE.md file'), distinguishing it from sibling tools like export_claude_md. It precisely defines the scope as updating only the block between specific markers while preserving other content.

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?

The description explicitly provides when to use this tool ('Safe to run on every commit or session end without producing churn') and when to use an alternative ('For one-shot rendering without touching the filesystem, use export_claude_md()'). It clearly distinguishes between persistent file updates and temporary rendering scenarios.

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/yakuphanycl/instinct'

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