get_section
Retrieve specific sections from French Roller Derby rules documentation, including game parameters, scoring, penalties, and officiating guidelines.
Instructions
Get the complete content of a specific rules section
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:154-179 (handler)Handler function for the get_section tool. Retrieves the specified section's file using sectionMap, reads its content from the sections directory, and returns it as MCP content or an error if the section is invalid.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 as a string with enum values for available sections.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 using server.registerTool, including name, schema, description, and handler.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)Helper mapping object from section ID strings to corresponding markdown filenames, used by the get_section handler.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", };