Skip to main content
Glama

create_or_update_rule

Create or update project documentation rules to capture coding patterns, architectural decisions, and lessons learned during development work.

Instructions

Document new coding patterns or architectural decisions AS YOU DISCOVER THEM during work. Call this when: you solve a tricky problem, establish a new pattern, learn a gotcha, make an architectural decision, or implement something that should be standardized. Captures lessons learned, design patterns, and team conventions as searchable knowledge for future work. Don't wait until the end - document insights immediately while context is fresh.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNameYesDocumentation file name. Must end with .md. Example: "api-patterns.md"
titleYesDocument title for display and search
descriptionNoBrief summary of the document's purpose
keywordsNoSearch keywords. Include technologies, patterns, and concepts covered
alwaysApplyYestrue: applies to all code (global rule). false: applies only when relevant (contextual)
contentYesFull markdown content of the documentation
Behavior3/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. It clearly indicates this is a write operation ('document', 'captures'), but lacks details on permissions, whether updates overwrite existing content, error handling, or response format. The description adds value by emphasizing immediate documentation while context is fresh, but doesn't fully compensate for the absence of annotations.

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 appropriately sized and front-loaded, starting with the core purpose and immediately following with usage guidelines. Every sentence earns its place by providing specific guidance without redundancy. The structure flows logically from what to document to when to document it.

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 tool's complexity (6 parameters, write operation) and absence of both annotations and output schema, the description does well by clearly explaining purpose and usage context. However, it lacks information about return values, error conditions, or how this tool interacts with sibling tools like 'add_docset' or 'refresh_documentation'. The description is complete for basic usage but could better address integration aspects.

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 6 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema (e.g., it doesn't explain how 'alwaysApply' interacts with 'keywords' or provide formatting examples for 'content'). Baseline 3 is appropriate when 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 tool's purpose with specific verbs ('document', 'captures') and resources ('coding patterns', 'architectural decisions', 'lessons learned', 'design patterns', 'team conventions'). It distinguishes from siblings by emphasizing immediate documentation of discoveries rather than retrieval or management functions like 'get_document_index' or 'remove_docset'.

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 provides explicit guidance on when to use this tool ('when you solve a tricky problem, establish a new pattern, learn a gotcha, make an architectural decision, or implement something that should be standardized') and when not to ('Don't wait until the end - document insights immediately'). It implicitly distinguishes from retrieval tools like 'search_documentation' by focusing on creation/update.

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/afterxleep/doc-bot'

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