API Reference
Complete reference documentation for Terry-Form MCP APIs and tools.
MCP Protocol Tools
API Reference
Complete API reference for Terry-Form MCP
MCP Tools Reference
Complete reference for all Terry-Form MCP tools
Quick Reference
Core Terraform Tools
| Tool | Description | Primary Use |
|---|---|---|
terry |
Execute Terraform operations | Plan, validate, format |
terry_workspace_list |
List available workspaces | Discovery |
terry_version |
Get Terraform version info | Compatibility check |
GitHub Integration
| Tool | Description | Primary Use |
|---|---|---|
github_clone_repo |
Clone/update repositories | Repository management |
github_list_terraform_files |
List .tf files in repo | Code discovery |
github_get_terraform_config |
Analyze Terraform configs | Code analysis |
Intelligence Tools
| Tool | Description | Primary Use |
|---|---|---|
terry_analyze |
Best practice analysis | Code quality |
terry_security_scan |
Security vulnerability scan | Security audit |
terry_recommendations |
Get improvement suggestions | Optimization |
Response Formats
All Terry-Form MCP tools follow consistent response patterns:
Success Response
{
"tool-name-results": {
"success": true,
"data": {
// Tool-specific data
},
"metadata": {
"duration": 1.234,
"timestamp": "2024-01-15T10:30:00Z"
}
}
}
Error Response
{
"error": "Descriptive error message",
"code": "ERROR_CODE",
"details": {
// Additional error context
}
}
Authentication
MCP Protocol
MCP protocol handles authentication at the transport level. No additional authentication required for tool calls.
Web API
For direct HTTP API access:
curl -H "X-API-Key: your-api-key" \
https://terry-form.example.com/api/v1/workspaces
GitHub App
Configure GitHub App credentials:
GITHUB_APP_ID: "123456"
GITHUB_APP_PRIVATE_KEY: "-----BEGIN RSA PRIVATE KEY-----..."
Rate Limits
| Endpoint Type | Limit | Window |
|---|---|---|
| General | 100 requests | 1 minute |
| Terraform Operations | 20 requests | 1 minute |
| GitHub Operations | 30 requests | 1 minute |
| Analysis Tools | 10 requests | 1 minute |
Tool Categories
🔧 Infrastructure Management
- terry - Core Terraform operations
- Workspace management
- Version information
🔗 Integrations
📊 Intelligence
Common Patterns
Sequential Operations
// Initialize, validate, and plan
const result = await mcp.call("terry", {
path: "production",
actions: ["init", "validate", "plan"],
vars: { environment: "prod" }
});
Error Handling
try {
const result = await mcp.call("terry", { path: "invalid/path" });
} catch (error) {
if (error.code === "PATH_TRAVERSAL") {
console.error("Invalid path specified");
}
}
Workspace Discovery
// List all workspaces
const workspaces = await mcp.call("terry_workspace_list");
// Filter initialized workspaces
const initialized = workspaces.workspaces.filter(w => w.initialized);
API Versioning
Terry-Form MCP follows semantic versioning for its API:
- v1 - Current stable version
- v2 - Future version (planned)
Version is included in HTTP API paths:
/api/v1/workspaces
/api/v1/operations
SDK Support
Python SDK
from terry_form_mcp import Client
client = Client(api_key="your-key")
result = client.terry(
path="production",
actions=["plan"],
vars={"environment": "prod"}
)
JavaScript SDK
import { TerryFormClient } from '@terry-form/mcp-client';
const client = new TerryFormClient({ apiKey: 'your-key' });
const result = await client.terry({
path: 'production',
actions: ['plan'],
vars: { environment: 'prod' }
});