Skip to content

API Reference ​

Complete API reference for Orchestre's MCP tools, schemas, and interfaces.

Overview ​

Orchestre provides APIs through the Model Context Protocol (MCP), enabling Claude Code to interact with its orchestration capabilities. This reference covers all available tools, their parameters, and response formats.

MCP Tools ​

Orchestre exposes five core tools through MCP:

Analysis & Planning ​

Execution & Review ​

Protocol Reference ​

Quick Reference ​

Tool Invocation ​

typescript
// MCP Request Format
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "analyze_project",
    "arguments": {
      "requirements": "Build a SaaS application"
    }
  }
}

// MCP Response Format
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [{
      "type": "text",
      "text": "{ \"analysis\": { ... } }"
    }]
  }
}

Common Patterns ​

Error Handling ​

typescript
{
  "content": [{
    "type": "text",
    "text": JSON.stringify({
      "error": "Error message",
      "code": "ERROR_CODE",
      "suggestion": "How to fix"
    })
  }],
  "isError": true
}

Successful Response ​

typescript
{
  "content": [{
    "type": "text",
    "text": JSON.stringify({
      "success": true,
      "data": { /* result data */ }
    })
  }]
}

Configuration ​

Integration ​

With Claude Code ​

json
{
  "mcpServers": {
    "orchestre": {
      "command": "node",
      "args": ["/path/to/orchestre/dist/server.js"],
      "env": {
        "GEMINI_API_KEY": "your-key",
        "OPENAI_API_KEY": "your-key"
      }
    }
  }
}

Programmatic Usage ​

While Orchestre is designed for Claude Code, you can interact with it programmatically:

typescript
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { analyzeProject } from "./tools/analyzeProject.js";

// Initialize MCP server
const server = new Server(
  { name: "orchestre", version: "3.0.0" },
  { capabilities: { tools: {} } }
);

// Register tool
server.addTool(
  {
    name: "analyze_project",
    description: "Analyze project requirements",
    inputSchema: { /* ... */ }
  },
  analyzeProject
);

Response Formats ​

Analysis Response ​

typescript
{
  "complexity": "moderate",
  "estimatedHours": 40,
  "technologies": [
    { "name": "Next.js", "purpose": "Frontend framework" }
  ],
  "risks": [
    { "type": "technical", "description": "...", "mitigation": "..." }
  ]
}

Plan Response ​

typescript
{
  "title": "Implementation Plan",
  "phases": [
    {
      "name": "Phase 1",
      "tasks": [
        { "id": "1", "title": "Setup project", "estimatedHours": 2 }
      ]
    }
  ]
}

Review Response ​

typescript
{
  "summary": {
    "score": 85,
    "strengths": ["Good architecture", "Clean code"],
    "improvements": ["Add more tests", "Improve error handling"]
  },
  "findings": [
    {
      "type": "security",
      "severity": "medium",
      "description": "...",
      "suggestion": "..."
    }
  ]
}

Best Practices ​

1. Always Validate Input ​

typescript
const schema = z.object({
  requirements: z.string().min(10).max(5000)
});

const validated = schema.parse(params);

2. Handle Errors Gracefully ​

typescript
try {
  const result = await processRequest(params);
  return successResponse(result);
} catch (error) {
  return errorResponse(error);
}

3. Provide Helpful Error Messages ​

typescript
return {
  error: "Requirements too vague",
  suggestion: "Include specific features, constraints, and goals",
  example: "Build a SaaS with user auth, billing, and dashboard"
};

Rate Limits ​

API providers have their own rate limits:

ProviderLimitWindow
Gemini60 requestsper minute
OpenAI3 requestsper minute (GPT-4)

Versioning ​

Orchestre follows semantic versioning:

  • Current Version: 3.0.0
  • MCP Protocol: 0.1.0
  • Breaking Changes: Major version bumps

Support ​

See Also ​

Built with ❤️ for the AI Coding community, by Praney Behl