Skip to main content
Glama

write_best_practice

Create and index a best practice document for coding standards, with auto-push to git. Use to define recurring patterns and conventions for your team.

Instructions

Create a coding standard or best practice document, index it, and auto-push.

    Side effects: creates best-practices/{slug}.md in the docs path,
    indexes it into the vector store, and pushes to git if configured.
    Overwrites an existing file with the same title.

    Use for recurring patterns, conventions, and rules the team should follow.
    Use write_architecture_doc() for system-level decisions,
    write_bugfix_summary() after fixing a specific bug.

    Args:
        title: Short title (e.g. "Error Handling in API Routes")
        context: When and where this practice applies
        rule: The actual rule or pattern to follow (be specific)
        rationale: Why this rule exists and what problems it prevents
        examples: Code examples showing correct vs incorrect usage (optional)
        project: Target project name (optional)

    Returns:
        Saved filename, chunk count, and whether auto-push succeeded.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
contextYes
ruleYes
rationaleYes
examplesNo
projectNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description fully carries the burden and discloses side effects: file creation, indexing, auto-push, and overwriting. It also mentions return value fields. However, it omits potential error conditions or permissions, which would elevate to 5.

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 well-structured with clear sections (side effects, usage, args, returns), uses bullet points for args, and is concise with no redundant information.

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?

All 6 parameters are explained, required fields noted, return value described, and side effects listed. No critical missing context despite the absence of annotations and output schema details.

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?

The input schema has no descriptions, but the description adds detailed semantics for each parameter, including examples for 'title' and 'examples'. This fully compensates for the 0% schema coverage, making parameter usage clear.

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 explicitly states the tool creates a coding standard or best practice document, indexes it, and auto-pushes. It distinguishes from siblings like write_architecture_doc and write_bugfix_summary, ensuring no ambiguity.

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?

It clearly advises using this tool for recurring patterns, conventions, and rules, and contrasts with alternatives: write_architecture_doc for system-level decisions and write_bugfix_summary for bug fixes, providing excellent guidance.

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/dl4rce/flaiwheel'

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