Skip to main content
Glama
Golrigames

Roller Derby Rules MCP Server

by Golrigames

search_rules

Find specific Roller Derby rules by searching with keywords to locate relevant sections on gameplay, penalties, scoring, and officiating.

Instructions

Search Roller Derby rules by keyword

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that searches for the given query in either the complete rules file or a specific section, extracts matching lines with surrounding context, and returns the results as JSON or a no-results message.
      async (args) => {
        const query = args.query.toLowerCase();
        const searchSection = args.section || "all";
        let results = [];
    
        if (searchSection === "all") {
          // Search in complete file
          const content = await fs.readFile(COMPLETE_FILE, "utf-8");
          const lines = content.split("\n");
    
          lines.forEach((line, index) => {
            if (line.toLowerCase().includes(query)) {
              // Add context (line before and after)
              const context = lines
                .slice(Math.max(0, index - 1), Math.min(lines.length, index + 2))
                .join("\n");
              results.push({
                line: index + 1,
                context: context,
              });
            }
          });
        } else {
          // Search in a specific section
          const filename = sectionMap[searchSection];
          if (filename) {
            const filePath = path.join(SECTIONS_DIR, filename);
            const content = await fs.readFile(filePath, "utf-8");
            const lines = content.split("\n");
    
            lines.forEach((line, index) => {
              if (line.toLowerCase().includes(query)) {
                const context = lines
                  .slice(Math.max(0, index - 1), Math.min(lines.length, index + 2))
                  .join("\n");
                results.push({
                  section: searchSection,
                  line: index + 1,
                  context: context,
                });
              }
            });
          }
        }
    
        return {
          content: [
            {
              type: "text",
              text:
                results.length > 0
                  ? JSON.stringify(results, null, 2)
                  : `No results found for "${args.query}"`,
            },
          ],
        };
      }
    );
  • Tool schema including description and inputSchema defining required 'query' parameter and optional 'section' with allowed values.
    {
      description: "Search Roller Derby rules by keyword",
      inputSchema: {
        type: "object",
        properties: {
          query: {
            type: "string",
            description: "The search term to look for in the rules",
          },
          section: {
            type: "string",
            description: "Specific section to search in (optional)",
            enum: [
              "introduction",
              "parametres",
              "le-jeu",
              "score",
              "penalites",
              "arbitrage",
              "all",
            ],
          },
        },
        required: ["query"],
      },
    },
  • index.js:182-184 (registration)
    Registration of the 'search_rules' tool via server.registerTool.
    // Tool: search_rules
    server.registerTool(
      "search_rules",
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the action ('Search') but fails to describe key traits such as whether this is a read-only operation, how results are returned (e.g., pagination, format), or any limitations (e.g., rate limits, authentication needs). This leaves significant gaps for a tool with zero annotation coverage.

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 that front-loads the core functionality without any wasted words. It directly conveys the tool's purpose in a clear and structured manner, making it easy for an agent to parse quickly.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the search returns (e.g., rule text, metadata, or identifiers), how results are structured, or any behavioral nuances. For a search tool with no structured data support, this leaves the agent with insufficient information to use it effectively.

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?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately adds semantic context by specifying the search scope ('Roller Derby rules') and method ('by keyword'), which goes beyond the empty schema. A baseline of 4 is applied since no parameters exist.

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 tool's purpose with a specific verb ('Search') and resource ('Roller Derby rules'), and indicates the search mechanism ('by keyword'). However, it doesn't explicitly differentiate from sibling tools like 'get_section' or 'list_sections' in terms of scope or functionality, preventing a perfect score.

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_section' or 'list_sections'. It lacks context about scenarios where keyword search is preferred over section-based retrieval, leaving the agent without explicit usage instructions.

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/Golrigames/RollerDerbyRulesMcp'

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