Skip to content

Commit 8af4610

Browse files
author
Lasim
committed
feat(all): MCP Tool Metadata Collection & Display
1 parent 94a274f commit 8af4610

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+7731
-586
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,13 @@ VS Code → HTTPS Request → DeployStack Satellite → MCP Server Process → E
236236
- **[Done]** **Tool Discovery API** - returns tool paths, descriptions, transport types, and relevance scores
237237
- **[Done]** **Smart Tool Execution** - automatic routing to stdio or HTTP/SSE backends with credential injection
238238
- **[Done]** **Performance Benchmarks** - achieved 99.5% token reduction (exceeded 90%+ target): 2 meta-tools (350 tokens) vs 150 tools (75,000 tokens)
239+
- **[Done]** **MCP Tool Metadata Collection** - automatic tool discovery with token counting, event-driven metadata sync from satellites to backend, per-installation tool storage with descriptions and input schemas
240+
- **[Done]** **Tool Display & Analytics API** - team-aware endpoints for fetching tool lists per installation and aggregated token savings across all team installations
239241
- **[To Do]** **Token Analytics Dashboard** - real-time monitoring UI of context window usage with before/after comparisons
240242
- **[To Do]** **Optimization Recommendations** - suggest which servers to disable based on usage patterns
241243
- **[To Do]** **Documentation & Case Study** - technical deep-dive blog post with real-world metrics
242244

243-
**Result**: Teams can now scale from 3 to 100+ MCP servers without performance degradation. Context window consumption reduced from 37.5% to 0.175%.
245+
**Result**: Teams can now scale from 3 to 100+ MCP servers without performance degradation. Context window consumption reduced from 37.5% to 0.175%. Full visibility into tool availability and token usage per installation.
244246

245247
### **Phase 5: Advanced Governance** (Next 90 Days)
246248

package-lock.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

services/backend/api-spec.json

Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11285,6 +11285,253 @@
1128511285
}
1128611286
}
1128711287
},
11288+
"/api/teams/{teamId}/mcp/installations/{installationId}/tools": {
11289+
"get": {
11290+
"summary": "Get installation tool metadata",
11291+
"tags": [
11292+
"MCP Tools"
11293+
],
11294+
"description": "Retrieves all discovered tools for a specific MCP installation with token consumption data. Requires mcp.tools.view permission. Returns empty array if no tools have been discovered yet.",
11295+
"parameters": [
11296+
{
11297+
"schema": {
11298+
"type": "string",
11299+
"minLength": 1
11300+
},
11301+
"in": "path",
11302+
"name": "teamId",
11303+
"required": true,
11304+
"description": "Team ID that owns the installation"
11305+
},
11306+
{
11307+
"schema": {
11308+
"type": "string",
11309+
"minLength": 1
11310+
},
11311+
"in": "path",
11312+
"name": "installationId",
11313+
"required": true,
11314+
"description": "Installation ID"
11315+
}
11316+
],
11317+
"security": [
11318+
{
11319+
"cookieAuth": []
11320+
}
11321+
],
11322+
"responses": {
11323+
"200": {
11324+
"description": "Tool metadata retrieved successfully",
11325+
"content": {
11326+
"application/json": {
11327+
"schema": {
11328+
"type": "object",
11329+
"properties": {
11330+
"success": {
11331+
"type": "boolean",
11332+
"description": "Indicates if the operation was successful"
11333+
},
11334+
"data": {
11335+
"type": "object",
11336+
"properties": {
11337+
"installation_id": {
11338+
"type": "string",
11339+
"description": "Installation unique identifier"
11340+
},
11341+
"installation_name": {
11342+
"type": "string",
11343+
"description": "Installation name"
11344+
},
11345+
"team_id": {
11346+
"type": "string",
11347+
"description": "Team identifier"
11348+
},
11349+
"server_slug": {
11350+
"type": "string",
11351+
"description": "MCP server slug"
11352+
},
11353+
"tool_count": {
11354+
"type": "number",
11355+
"description": "Number of tools discovered"
11356+
},
11357+
"total_tokens": {
11358+
"type": "number",
11359+
"description": "Total token count across all tools"
11360+
},
11361+
"tools": {
11362+
"type": "array",
11363+
"items": {
11364+
"type": "object",
11365+
"properties": {
11366+
"id": {
11367+
"type": "string",
11368+
"description": "Tool metadata unique identifier"
11369+
},
11370+
"tool_name": {
11371+
"type": "string",
11372+
"description": "Name of the tool"
11373+
},
11374+
"description": {
11375+
"type": "string",
11376+
"description": "Tool description"
11377+
},
11378+
"input_schema": {
11379+
"type": "object",
11380+
"description": "JSON Schema for tool input"
11381+
},
11382+
"token_count": {
11383+
"type": "number",
11384+
"description": "Token count for this tool"
11385+
},
11386+
"discovered_at": {
11387+
"type": "string",
11388+
"description": "ISO 8601 timestamp when tool was discovered"
11389+
},
11390+
"updated_at": {
11391+
"type": "string",
11392+
"description": "ISO 8601 timestamp when tool was last updated"
11393+
}
11394+
},
11395+
"required": [
11396+
"id",
11397+
"tool_name",
11398+
"description",
11399+
"input_schema",
11400+
"token_count",
11401+
"discovered_at",
11402+
"updated_at"
11403+
]
11404+
},
11405+
"description": "Array of discovered tools"
11406+
}
11407+
},
11408+
"required": [
11409+
"installation_id",
11410+
"installation_name",
11411+
"team_id",
11412+
"server_slug",
11413+
"tool_count",
11414+
"total_tokens",
11415+
"tools"
11416+
]
11417+
}
11418+
},
11419+
"required": [
11420+
"success",
11421+
"data"
11422+
],
11423+
"description": "Tool metadata retrieved successfully"
11424+
}
11425+
}
11426+
}
11427+
},
11428+
"401": {
11429+
"description": "Unauthorized - Authentication required",
11430+
"content": {
11431+
"application/json": {
11432+
"schema": {
11433+
"type": "object",
11434+
"properties": {
11435+
"success": {
11436+
"type": "boolean",
11437+
"default": false,
11438+
"description": "Indicates failure"
11439+
},
11440+
"error": {
11441+
"type": "string",
11442+
"description": "Error message detailing what went wrong"
11443+
}
11444+
},
11445+
"required": [
11446+
"success",
11447+
"error"
11448+
],
11449+
"description": "Unauthorized - Authentication required"
11450+
}
11451+
}
11452+
}
11453+
},
11454+
"403": {
11455+
"description": "Forbidden - Insufficient permissions or not a team member",
11456+
"content": {
11457+
"application/json": {
11458+
"schema": {
11459+
"type": "object",
11460+
"properties": {
11461+
"success": {
11462+
"type": "boolean",
11463+
"default": false,
11464+
"description": "Indicates failure"
11465+
},
11466+
"error": {
11467+
"type": "string",
11468+
"description": "Error message detailing what went wrong"
11469+
}
11470+
},
11471+
"required": [
11472+
"success",
11473+
"error"
11474+
],
11475+
"description": "Forbidden - Insufficient permissions or not a team member"
11476+
}
11477+
}
11478+
}
11479+
},
11480+
"404": {
11481+
"description": "Not Found - Installation does not exist or does not belong to specified team",
11482+
"content": {
11483+
"application/json": {
11484+
"schema": {
11485+
"type": "object",
11486+
"properties": {
11487+
"success": {
11488+
"type": "boolean",
11489+
"default": false,
11490+
"description": "Indicates failure"
11491+
},
11492+
"error": {
11493+
"type": "string",
11494+
"description": "Error message detailing what went wrong"
11495+
}
11496+
},
11497+
"required": [
11498+
"success",
11499+
"error"
11500+
],
11501+
"description": "Not Found - Installation does not exist or does not belong to specified team"
11502+
}
11503+
}
11504+
}
11505+
},
11506+
"500": {
11507+
"description": "Internal Server Error",
11508+
"content": {
11509+
"application/json": {
11510+
"schema": {
11511+
"type": "object",
11512+
"properties": {
11513+
"success": {
11514+
"type": "boolean",
11515+
"default": false,
11516+
"description": "Indicates failure"
11517+
},
11518+
"error": {
11519+
"type": "string",
11520+
"description": "Error message detailing what went wrong"
11521+
}
11522+
},
11523+
"required": [
11524+
"success",
11525+
"error"
11526+
],
11527+
"description": "Internal Server Error"
11528+
}
11529+
}
11530+
}
11531+
}
11532+
}
11533+
}
11534+
},
1128811535
"/api/teams/{teamId}/cloud-providers": {
1128911536
"get": {
1129011537
"summary": "List available cloud providers",

0 commit comments

Comments
 (0)