get_section
Retrieve complete rulebook sections for French Roller Derby, including game parameters, scoring, penalties, and officiating guidelines.
Instructions
Get the complete content of a specific rules section
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- index.js:154-179 (handler)Handler function that retrieves the markdown content of a specified rules section using the sectionMap lookup and fs.readFile.async (args) => { const filename = sectionMap[args.section]; if (!filename) { return { content: [ { type: "text", text: `Invalid section: ${args.section}`, }, ], isError: true, }; } const filePath = path.join(SECTIONS_DIR, filename); const content = await fs.readFile(filePath, "utf-8"); return { content: [ { type: "text", text: content, }, ], }; }
- index.js:135-152 (schema)Input schema for get_section tool, defining the required 'section' parameter with allowed enum values.inputSchema: { type: "object", properties: { section: { type: "string", description: "The section to retrieve", enum: [ "introduction", "parametres", "le-jeu", "score", "penalites", "arbitrage", ], }, }, required: ["section"], },
- index.js:131-180 (registration)Registration of the get_section tool with McpServer, including description, input schema, and handler function.server.registerTool( "get_section", { description: "Get the complete content of a specific rules section", inputSchema: { type: "object", properties: { section: { type: "string", description: "The section to retrieve", enum: [ "introduction", "parametres", "le-jeu", "score", "penalites", "arbitrage", ], }, }, required: ["section"], }, }, async (args) => { const filename = sectionMap[args.section]; if (!filename) { return { content: [ { type: "text", text: `Invalid section: ${args.section}`, }, ], isError: true, }; } const filePath = path.join(SECTIONS_DIR, filename); const content = await fs.readFile(filePath, "utf-8"); return { content: [ { type: "text", text: content, }, ], }; } );
- index.js:46-53 (helper)Section mapping helper object used by get_section to map section IDs to filenames.const sectionMap = { introduction: "00-introduction.md", parametres: "01-parametres.md", "le-jeu": "02-le-jeu.md", score: "03-score.md", penalites: "04-penalites.md", arbitrage: "05-arbitrage.md", };