]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
refactor(mcp): split MCP definitions by spec concern — Resources, Tools, ToolSchemas
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 24 Mar 2026 00:58:12 +0000 (01:58 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 24 Mar 2026 00:58:12 +0000 (01:58 +0100)
commit9d738e3408daddd27d2182d7416dd22eb38c0cea
treefaed91f98f5dda46161d62f553f8cbd2c9af0840
parent6eb69c8939189af3f6d8df55eb9935afc514262f
refactor(mcp): split MCP definitions by spec concern — Resources, Tools, ToolSchemas

Rename MCPResourceHandlers.ts to MCPResources.ts (contains only MCP
Resources: station-list, station-by-id, template-list, OCPP schemas).

Extract log tools (readCombinedLog, readErrorLog) and their helpers
(getLogFilePath, tailFile) into MCPTools.ts (MCP Tools per spec).

MCPToolSchemas.ts unchanged (tool schema definitions).

Directory now reflects MCP spec separation of concerns:
- MCPResources.ts  — MCP Resources (spec §Resources)
- MCPTools.ts      — MCP Tools with custom logic (spec §Tools)
- MCPToolSchemas.ts — Tool schema definitions for OCPP commands
src/charging-station/ui-server/mcp/MCPResources.ts [moved from src/charging-station/ui-server/mcp/MCPResourceHandlers.ts with 59% similarity]
src/charging-station/ui-server/mcp/MCPTools.ts [new file with mode: 0644]
src/charging-station/ui-server/mcp/index.ts