list_sections
Retrieve all available sections from the French Roller Derby rulebook to browse the complete rulebook structure and access specific game parameters, scoring, penalties, and officiating rules.
Instructions
List all available rules sections
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {},
"type": "object"
}
Implementation Reference
- index.js:114-127 (handler)The asynchronous handler function for the 'list_sections' tool. It returns a text content block containing a JSON string of the available sections (id and name) mapped from the SECTIONS constant.async () => { return { content: [ { type: "text", text: JSON.stringify( SECTIONS.map((s) => ({ id: s.id, name: s.name })), null, 2 ), }, ], }; }
- index.js:110-113 (schema)The schema object for the 'list_sections' tool, including a description and an empty inputSchema since the tool takes no parameters.{ description: "List all available rules sections", inputSchema: {}, },
- index.js:108-128 (registration)The server.registerTool call that registers the 'list_sections' tool, specifying its name, schema, and handler function.server.registerTool( "list_sections", { description: "List all available rules sections", inputSchema: {}, }, async () => { return { content: [ { type: "text", text: JSON.stringify( SECTIONS.map((s) => ({ id: s.id, name: s.name })), null, 2 ), }, ], }; } );
- index.js:32-43 (helper)The SECTIONS constant array, which defines the list of available rules sections and is used by the list_sections tool handler to generate the response.const SECTIONS = [ { id: "00-introduction", name: "Introduction", file: "00-introduction.md" }, { id: "01-parametres", name: "Match parameters and safety", file: "01-parametres.md", }, { id: "02-le-jeu", name: "The game", file: "02-le-jeu.md" }, { id: "03-score", name: "Score", file: "03-score.md" }, { id: "04-penalites", name: "Penalties", file: "04-penalites.md" }, { id: "05-arbitrage", name: "Officiating", file: "05-arbitrage.md" }, ];