Files
mcpctl/.taskmaster/tasks/task_109.md

95 lines
2.3 KiB
Markdown
Raw Permalink Normal View History

# Task ID: 109
**Title:** Implement Studio MCP Server Tools
**Status:** done
**Dependencies:** 104 ✗, 106 ✓, 107 ✓, 108 ✓
**Priority:** medium
**Description:** Create MCP tools for Claude Monitor to observe traffic, get corrections, switch models, and modify stages.
**Details:**
Extend `src/cli/src/commands/console/inspect-mcp.ts` with studio tools:
```typescript
const studioTools: Tool[] = [
{
name: 'get_content_diff',
description: 'Get original vs transformed vs edited content for a specific event',
inputSchema: {
type: 'object',
properties: {
eventId: { type: 'string', description: 'Event ID' },
},
required: ['eventId'],
},
},
{
name: 'get_corrections',
description: 'Get all user corrections (edits) in a session',
inputSchema: {
type: 'object',
properties: {
sessionId: { type: 'string', description: 'Optional session filter' },
},
},
},
{
name: 'get_active_model',
description: 'Get current proxymodel name and stage list for a project',
inputSchema: {
type: 'object',
properties: {
project: { type: 'string' },
},
required: ['project'],
},
},
{
name: 'switch_model',
description: 'Hot-swap the active proxymodel on a project',
inputSchema: {
type: 'object',
properties: {
project: { type: 'string' },
model: { type: 'string' },
},
required: ['project', 'model'],
},
},
{
name: 'reload_stages',
description: 'Force reload all stages from ~/.mcpctl/stages/',
inputSchema: { type: 'object', properties: {} },
},
{
name: 'get_stage_source',
description: 'Read the source code of a stage file',
inputSchema: {
type: 'object',
properties: {
name: { type: 'string' },
},
required: ['name'],
},
},
{
name: 'list_models',
description: 'List available proxymodels',
inputSchema: { type: 'object', properties: {} },
},
{
name: 'list_stages',
description: 'List available stages',
inputSchema: { type: 'object', properties: {} },
},
];
```
**Test Strategy:**
Integration test with MCP client: each tool returns expected data format, switch_model actually changes the model, reload_stages picks up file changes, get_corrections returns user edits.