Skip to main content
Glama
ggerve

Coding Standards MCP Server

by ggerve

get_best_practices

Retrieve coding best practices and style guidelines for specific programming languages in Markdown format to improve code quality and maintainability.

Instructions

Get application best practices for the specified language in Markdown format

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • server.py:68-71 (handler)
    Handler function that takes a language parameter, constructs the corresponding best practices template filename, and returns its content by calling the read_template helper.
    def get_best_practices(language: str) -> str:
        """Get application best practices for the specified language in Markdown format"""
        filename = f"{language}_best_practices.md"
        return read_template(filename)
  • server.py:67-67 (registration)
    Registers the get_best_practices function as an MCP tool using the @mcp.tool() decorator.
    @mcp.tool()
  • Helper function used by the handler to read the content of a template file from the templates directory, handling errors appropriately.
    def read_template(filename: str) -> str:
        """Read content from a template file"""
        template_path = os.path.join(os.path.dirname(__file__), "templates", filename)
        try:
            with open(template_path, "r") as f:
                return f.read()
        except FileNotFoundError:
            return f"Error: Template file {filename} not found"
        except Exception as e:
            return f"Error reading template {filename}: {str(e)}"
Behavior2/5

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

With no annotations provided, the description carries full burden but only states what the tool does, not how it behaves. It doesn't disclose whether this is a read-only operation, if it requires authentication, rate limits, error conditions, or what happens if the language isn't supported. The description adds minimal behavioral context beyond the basic function.

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 a single, efficient sentence with zero wasted words. It's appropriately sized for a simple tool and front-loads the core functionality without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (which handles return values), no annotations, and simple parameters, the description covers the basic purpose adequately. However, for a tool with 0% schema description coverage and no annotations, it should provide more parameter guidance and behavioral context to be truly complete.

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?

The schema description coverage is 0%, so the description must compensate. It mentions 'for the specified language' which maps to the single 'language' parameter, providing some semantic meaning. However, it doesn't specify format constraints, valid values, or examples for the language parameter, leaving significant gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('application best practices') with specific format ('Markdown format') and scoping ('for the specified language'). It doesn't explicitly differentiate from sibling tools like get_style_guide or list_templates, but the purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like get_style_guide or list_templates. It mentions the language parameter but doesn't explain prerequisites, limitations, or appropriate contexts for usage.

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/ggerve/coding-standards-mcp'

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