Skip to content

MCP Tool definition - #197

@DhavalRepo18

Description

@DhavalRepo18

The MCP Specification suggests that tools and similar entities should be defined by a tool decorator. Please take a look at the tool Decorator. https://gofastmcp.com/servers/tools

Also our code is quickly scanned by @Anselmoo - https://github.com/Anselmoo/mcp-zen-of-languages/blob/69658080421b95a3fdb1f484b62f66bb58f167e9/src/mcp_zen_of_languages/server.py#L357-L366

@mcp.tool(
    name="analyze_zen_violations",
    version=ANALYZE_ZEN_VIOLATIONS_VERSION,
    title="Analyze zen violations",
    description="Analyze a code snippet against zen rules and return analysis results.",
    icons=ANALYSIS_TOOL_ICONS,
    tags={"analysis", "zen", "snippet"},
    annotations=READONLY_ANNOTATIONS,
    output_schema=_output_schema(AnalysisResult),
)

Currently, our defined tools have a scope to improve based on the above feedback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions