Skip to content

Commit e0611a2

Browse files
committed
Update mcp-servers spec
1 parent c143715 commit e0611a2

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

specs/mcp-servers/spec.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# MCP Servers
22

33
## Purpose
4-
This spec describes the MCP server introspection API — querying a live MCP deployment for its advertised tools, resources, and prompts via the MCP protocol. All three listing endpoints support cursor-based pagination.
4+
This spec describes the MCP server interaction API — querying a live MCP deployment for its advertised tools, resources, and prompts via the MCP protocol, as well as invoking individual tools. All three listing endpoints support cursor-based pagination.
55

66
Status: **Implemented**
77

@@ -49,6 +49,23 @@ Status: **Implemented**
4949
- **WHEN** `GET /api/v1/deployments/mcp/{deploymentId}/prompts` is called
5050
- **THEN** the list of prompts advertised by the MCP server is returned
5151

52+
### Requirement: Call an MCP tool on a deployment
53+
The system SHALL invoke a specific tool on a live MCP deployment and return the result.
54+
55+
Status: **Implemented**
56+
57+
#### Scenario: Successful tool call
58+
- **WHEN** `POST /api/v1/deployments/mcp/{deploymentId}/call-tool` is called with a valid tool name and arguments
59+
- **THEN** the tool is invoked on the MCP server and the result is returned
60+
61+
#### Scenario: MCP server unreachable during tool call
62+
- **WHEN** `POST /api/v1/deployments/mcp/{deploymentId}/call-tool` is called and the MCP server is unavailable
63+
- **THEN** an appropriate error response is returned
64+
65+
#### Scenario: Non-existent deployment
66+
- **WHEN** `POST /api/v1/deployments/mcp/{deploymentId}/call-tool` is called with an unknown deployment ID
67+
- **THEN** the system responds with 404
68+
5269
### Requirement: Cursor-based pagination for MCP listings
5370
Tools, resources, and prompts listing endpoints SHALL support cursor-based pagination via an optional `nextCursor` query parameter.
5471

@@ -67,6 +84,7 @@ Status: **Implemented**
6784
- Base path: `/api/v1/deployments/mcp`
6885
- Endpoints:
6986
- `GET /api/v1/deployments/mcp/{deploymentId}/tools`
87+
- `POST /api/v1/deployments/mcp/{deploymentId}/call-tool`
7088
- `GET /api/v1/deployments/mcp/{deploymentId}/resources`
7189
- `GET /api/v1/deployments/mcp/{deploymentId}/prompts`
7290
- Service: `com.epam.aidial.deployment.manager.service.McpService`
@@ -77,6 +95,6 @@ Status: **Implemented**
7795
- MCP endpoint path resolver: `com.epam.aidial.deployment.manager.service.McpEndpointPathResolver`
7896
- Health checker: `com.epam.aidial.deployment.manager.service.deployment.healthcheck.McpHealthChecker`
7997
- MCP SDK: `io.modelcontextprotocol` (protocol communication via `McpSyncClient`)
80-
- Response types: `McpSchema.ListToolsResult`, `McpSchema.ListResourcesResult`, `McpSchema.ListPromptsResult`
98+
- Request/response types: `McpSchema.CallToolRequest` / `McpSchema.CallToolResult`, `McpSchema.ListToolsResult`, `McpSchema.ListResourcesResult`, `McpSchema.ListPromptsResult`
8199
- Pagination: optional `nextCursor` query parameter (`@RequestParam(required = false)`) on all three listing endpoints
82100
- Related specs: `mcp-deployments`, `mcp-image-definitions`

0 commit comments

Comments
 (0)