Skip to main content
Glama

export_agent_rules

Generate or update standardized AI agent rule files for Cursor, Cline, Windsurf, or GitHub Copilot in your workspace for AI pair-programming.

Instructions

Generates and writes standardized AI agent rule specifications (.cursorrules, .cursor/rules/*.mdc, .clinerules, and .github/copilot-instructions.md) into the workspace.

Behavior:

  • Mutating: Creates or updates configuration files in the target workspace directory.

  • Idempotent: Overwrites existing T-Zero agent rule files with current architecture rules without corrupting user customizations.

  • 100% Offline: Generates rule files locally using built-in templates.

Usage Guidelines:

  • When to use: Run when setting up a repository for AI pair-programming with Cursor, Claude Code, Cline, Windsurf, or GitHub Copilot.

  • Sibling Routing: To view architectural boundaries without writing files to disk, use 'query_architecture_boundaries'.

Returns: Confirmation message listing all generated rule file paths.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNoTarget editor format: 'cursor', 'cline', 'windsurf', or 'all' (default: 'all').all
project_rootNoTarget workspace directory where agent rule files will be created (default: current directory)..

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • addedInput schema / properties / project_root / description
      Added value: +"Target workspace directory where agent rule files will be created (default: current directory)."
    • addedInput schema / properties / target / description
      Added value: +"Target editor format: 'cursor', 'cline', 'windsurf', or 'all' (default: 'all')."
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and does so well: it discloses that it is mutating, idempotent (overwrites T-Zero rule files without corrupting user customizations), and 100% offline using built-in templates. These are exactly the behavioral traits an agent needs before invoking a write tool.

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?

Well-structured with labeled sections (Behavior, Usage Guidelines, Returns) and front-loaded purpose. Every line earns its place by conveying behavioral or routing information rather than restating the name.

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?

Complete for a file-writing tool: mutation semantics, idempotency, offline behavior, when-to-use, sibling routing, and return value are all covered. An output schema exists, and the description still summarizes the return value, leaving nothing an agent needs missing.

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 both parameters (target, project_root) are already documented including the target's default of 'all'. The description adds no syntax or format detail beyond the schema, so the baseline 3 applies.

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+resource ('Generates and writes standardized AI agent rule specifications') and enumerates the exact file formats produced (.cursorrules, .cursor/rules/*.mdc, .clinerules, .github/copilot-instructions.md). This is unambiguous and clearly distinct from siblings like query_architecture_boundaries.

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?

Explicitly names when to use it ('setting up a repository for AI pair-programming with Cursor, Claude Code, Cline, Windsurf, or GitHub Copilot') and routes to the alternative ('To view architectural boundaries without writing files to disk, use query_architecture_boundaries'). The write-vs-read distinction is spelled out.

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