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

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)}"

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