The server currently functions as a standard REST API, which forces the agent to use curl. This is inefficient and does not align with the Model Context Protocol (MCP) vision.
This ticket covers the refactoring of the server to become a true MCP-compliant, tool-providing server. It will parse its own openapi.yaml to dynamically expose its capabilities as tools for the agent.
Acceptance Criteria
- A new
toolService.mjs is created that can parse the openapi.yaml and map API endpoints to their underlying service functions.
- A new
tools.mjs route is created.
- A
GET /tools/list endpoint is implemented. It returns a JSON array of available tools, derived from the OpenAPI spec.
- A
POST /tools/call endpoint is implemented. It receives a toolName and arguments, executes the correct service function, and returns the result.
- The existing REST endpoints (e.g.,
/pull-requests, /labels) remain functional for now but are considered deprecated for agent use.
The server currently functions as a standard REST API, which forces the agent to use
curl. This is inefficient and does not align with the Model Context Protocol (MCP) vision.This ticket covers the refactoring of the server to become a true MCP-compliant, tool-providing server. It will parse its own
openapi.yamlto dynamically expose its capabilities as tools for the agent.Acceptance Criteria
toolService.mjsis created that can parse theopenapi.yamland map API endpoints to their underlying service functions.tools.mjsroute is created.GET /tools/listendpoint is implemented. It returns a JSON array of available tools, derived from the OpenAPI spec.POST /tools/callendpoint is implemented. It receives atoolNameandarguments, executes the correct service function, and returns the result./pull-requests,/labels) remain functional for now but are considered deprecated for agent use.