Skip to main content
Glama

update_ai_readme

Records project conventions and decisions to AI_README.md, preventing conflicts and ensuring consistent AI behavior.

Instructions

CALL THIS to record DECISIONS and CONVENTIONS.

WHEN TO CALL:

A. CONFLICT RESOLUTION — STOP IMMEDIATELY when any of these occur:

  • User says: "don't use X", "use Y instead", "prefer", "switch to".

  • During planning: user's request or your proposal differs from AI_README conventions.

  • During planning: user approves a plan that contradicts AI_README.

  • User overrides a convention mid-task (even casually, e.g. 'just use X here').

  • DO NOT continue planning or coding. Call update_ai_readme first, then resume.

B. ARCHITECTURAL DECISIONS (during planning/implementation):

  • You chose a design pattern (e.g., repository pattern, factory, singleton).

  • You decided on API structure (REST paths, error format, response shape).

  • You established naming conventions (files, functions, variables).

  • You created new abstractions (utilities, hooks, services, types).

  • You set up error handling strategy or validation approach.

  • You introduced a new dependency or integration pattern.

C. IMPLEMENTATION PATTERNS (after writing code):

  • You created a reusable pattern others should follow.

  • You established a file/folder structure for a new feature.

  • You made decisions that affect future development.

D. MISSING / UNDOCUMENTED (during get_context or code review):

  • AI_README is missing a convention that is ALREADY USED in 2+ existing files.

  • A pattern exists in code but not in AI_README — record it so future code follows it.

  • Do NOT record one-off choices or speculative future patterns.

RULE: If a decision will affect MORE THAN ONE FILE or FUTURE CODE → RECORD IT.

WORKFLOW:

  1. get_context (read current conventions).

  2. Make decision or detect conflict.

  3. update_ai_readme (record the decision).

  4. Continue with implementation.

Content Rules:

  • Extremely concise (default < 400 tokens; project may set a higher tokenBudget).

  • Only actionable conventions (tech, naming, patterns, infrastructure patterns, testing patterns).

  • NO explanations or examples

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationsYesList of update operations to perform
readmePathYesPath to the AI_README.md file to update
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses that 'rewrite' is a last resort and prefers targeted operations, but does not mention side effects, permission needs, or error states. The schema descriptions fill some gaps, but the description itself could be more explicit about the tool's effects.

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-loaded with the primary purpose, and structured with clear sections (WHEN TO CALL, WORKFLOW, Content Rules). While lengthy, each part serves a purpose. Could be slightly more concise but is well-organized.

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 complexity of the tool and lack of output schema, the description covers usage scenarios, content format, operation types, and workflow well. It omits error handling and success feedback, but is largely complete for an AI agent.

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 coverage is 100%, baseline 3. The description adds significant value with content formatting rules (bullets, fragments, examples) and operation preference guidance (e.g., 'PREFER targeted operations'). This goes beyond the 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?

The description clearly states the tool records 'DECISIONS and CONVENTIONS' and provides specific scenarios (A, B, C, D) that differentiate it from siblings like init_ai_readme, compress_ai_readme, etc. It uses strong verbs and resource naming.

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?

Explicit when-to-call conditions are provided (conflict resolution, architectural decisions, implementation patterns, missing/undocumented), including a workflow (get_context → update_ai_readme → continue) and what not to record (one-off choices). It clearly distinguishes from alternatives.

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/Draco-Cheng/ai-readme-mcp'

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