Skip to main content

MCP Tools Reference

STOA exposes platform capabilities as MCP tools that AI agents can discover and invoke. This reference documents all built-in tools.

Tool Categories​

CategoryToolsDescription
Platform & Discoverystoa_platform_info, stoa_platform_health, stoa_toolsPlatform status and tool discovery
API Catalogstoa_catalog, stoa_api_specBrowse and search APIs
Subscriptionsstoa_subscriptionManage API access and credentials
Observabilitystoa_metrics, stoa_logs, stoa_alertsMonitor API usage and health
UAC Contractsstoa_uacUniversal API Contract management
Securitystoa_securityAudit logs and permissions

Platform & Discovery​

stoa_platform_info​

Get STOA platform version, status, and available features.

// Request
{"name": "stoa_platform_info", "arguments": {}}

// Response
{
"version": "0.9.0",
"status": "healthy",
"features": ["mcp-gateway", "uac", "multi-tenant"],
"mcp_protocol_version": "2024-11-05"
}

stoa_platform_health​

Health check all platform components.

ParameterTypeRequiredDescription
componentsstring[]NoSpecific components to check (all if empty)
// Request
{"name": "stoa_platform_health", "arguments": {"components": ["gateway", "database"]}}

// Response
{
"gateway": {"status": "healthy", "latency_ms": 12},
"database": {"status": "healthy", "latency_ms": 8},
"overall": "healthy"
}

stoa_tools​

Tool discovery and schema retrieval.

ParameterTypeRequiredDescription
actionstringYeslist, schema, or search
tool_namestringFor schemaTool name to get schema for
querystringFor searchSearch query
categorystringNoFilter by category
// List all tools
{"name": "stoa_tools", "arguments": {"action": "list", "category": "API Catalog"}}

// Get tool schema
{"name": "stoa_tools", "arguments": {"action": "schema", "tool_name": "stoa_catalog"}}

// Search tools
{"name": "stoa_tools", "arguments": {"action": "search", "query": "subscription"}}

API Catalog​

stoa_catalog​

Browse, search, and manage APIs in the catalog.

ParameterTypeRequiredDescription
actionstringYeslist, get, search, versions, categories
api_idstringFor get, versionsAPI identifier
querystringFor searchSearch query
statusstringNoFilter: active, deprecated, draft
tagsstring[]NoFilter by tags
pageintegerNoPage number (default: 1)
page_sizeintegerNoResults per page (default: 20)
// List active APIs
{"name": "stoa_catalog", "arguments": {"action": "list", "status": "active"}}

// Get API details
{"name": "stoa_catalog", "arguments": {"action": "get", "api_id": "billing-api-v2"}}

// Search APIs
{"name": "stoa_catalog", "arguments": {"action": "search", "query": "payment", "tags": ["finance"]}}

// List API versions
{"name": "stoa_catalog", "arguments": {"action": "versions", "api_id": "billing-api"}}

// List categories
{"name": "stoa_catalog", "arguments": {"action": "categories"}}

stoa_api_spec​

Retrieve API specifications and documentation.

ParameterTypeRequiredDescription
actionstringYesopenapi, docs, endpoints
api_idstringYesAPI identifier
formatstringNojson or yaml (default: json)
versionstringNoAPI version (latest if omitted)
sectionstringNoDoc section for docs action
methodstringNoFilter endpoints by HTTP method
// Get OpenAPI spec
{"name": "stoa_api_spec", "arguments": {"action": "openapi", "api_id": "billing-api", "format": "yaml"}}

// Get documentation
{"name": "stoa_api_spec", "arguments": {"action": "docs", "api_id": "billing-api", "section": "authentication"}}

// List endpoints
{"name": "stoa_api_spec", "arguments": {"action": "endpoints", "api_id": "billing-api", "method": "POST"}}

Subscriptions & Access​

stoa_subscription​

Manage API subscriptions, credentials, and lifecycle.

ParameterTypeRequiredDescription
actionstringYeslist, get, create, cancel, credentials, rotate_key
subscription_idstringFor get, cancel, credentials, rotate_keySubscription ID
api_idstringFor createAPI to subscribe to
planstringNoSubscription plan
reasonstringNoCancellation reason
grace_period_hoursintegerNoHours to keep old key valid (default: 24)
// List subscriptions
{"name": "stoa_subscription", "arguments": {"action": "list", "status": "active"}}

// Subscribe to an API
{"name": "stoa_subscription", "arguments": {"action": "create", "api_id": "billing-api", "plan": "standard"}}

// Get credentials
{"name": "stoa_subscription", "arguments": {"action": "credentials", "subscription_id": "sub-123"}}

// Rotate API key
{"name": "stoa_subscription", "arguments": {"action": "rotate_key", "subscription_id": "sub-123", "grace_period_hours": 48}}

// Cancel subscription
{"name": "stoa_subscription", "arguments": {"action": "cancel", "subscription_id": "sub-123", "reason": "Migrating to v2"}}

Observability & Metrics​

stoa_metrics​

Retrieve API usage, latency, errors, and quota metrics.

ParameterTypeRequiredDescription
actionstringYesusage, latency, errors, quota
api_idstringFor usage, latency, errorsAPI identifier
subscription_idstringFor quotaSubscription ID
time_rangestringNo1h, 24h, 7d, 30d, custom
endpointstringNoSpecific endpoint for latency
// Get usage metrics
{"name": "stoa_metrics", "arguments": {"action": "usage", "api_id": "billing-api", "time_range": "24h"}}

// Get latency stats (p50, p95, p99)
{"name": "stoa_metrics", "arguments": {"action": "latency", "api_id": "billing-api", "endpoint": "/invoices"}}

// Get error breakdown
{"name": "stoa_metrics", "arguments": {"action": "errors", "api_id": "billing-api", "error_code": 500}}

// Check quota usage
{"name": "stoa_metrics", "arguments": {"action": "quota", "subscription_id": "sub-123"}}

stoa_logs​

Search and retrieve API call logs.

ParameterTypeRequiredDescription
actionstringYessearch, recent
api_idstringNoAPI identifier
querystringFor searchLucene query syntax
levelstringNodebug, info, warn, error
time_rangestringNo1h, 24h, 7d
limitintegerNoMax results (default: 100)
// Search error logs
{"name": "stoa_logs", "arguments": {"action": "search", "api_id": "billing-api", "query": "timeout", "level": "error"}}

// Get recent logs
{"name": "stoa_logs", "arguments": {"action": "recent", "api_id": "billing-api", "limit": 50}}

stoa_alerts​

Manage API alerts and incidents.

ParameterTypeRequiredDescription
actionstringYeslist, acknowledge
alert_idstringFor acknowledgeAlert ID
api_idstringNoFilter by API
severitystringNoinfo, warning, critical
statusstringNoactive, acknowledged, resolved
commentstringNoAcknowledgement comment
// List critical alerts
{"name": "stoa_alerts", "arguments": {"action": "list", "severity": "critical", "status": "active"}}

// Acknowledge alert
{"name": "stoa_alerts", "arguments": {"action": "acknowledge", "alert_id": "alert-123", "comment": "Investigating root cause"}}

UAC Contracts​

stoa_uac​

Universal API Contract management.

ParameterTypeRequiredDescription
actionstringYeslist, get, validate, sla
contract_idstringFor get, validate, slaContract ID
api_idstringNoFilter by API
subscription_idstringFor validateSubscription to validate
statusstringNoactive, expired, pending
time_rangestringNoFor SLA metrics: 7d, 30d, 90d
// List active contracts
{"name": "stoa_uac", "arguments": {"action": "list", "api_id": "billing-api", "status": "active"}}

// Get contract details
{"name": "stoa_uac", "arguments": {"action": "get", "contract_id": "uac-123"}}

// Validate compliance
{"name": "stoa_uac", "arguments": {"action": "validate", "contract_id": "uac-123", "subscription_id": "sub-456"}}

// Get SLA metrics
{"name": "stoa_uac", "arguments": {"action": "sla", "contract_id": "uac-123", "time_range": "30d"}}

Security & Compliance​

stoa_security​

Security audit and permission management.

ParameterTypeRequiredDescription
actionstringYesaudit_log, check_permissions, list_policies
api_idstringNoAPI identifier
action_typestringFor check_permissionsread, write, admin
policy_typestringNorate_limit, ip_whitelist, oauth, jwt
time_rangestringNo24h, 7d, 30d, 90d
limitintegerNoMax audit entries (default: 100)
// Get audit log
{"name": "stoa_security", "arguments": {"action": "audit_log", "api_id": "billing-api", "time_range": "7d"}}

// Check permissions
{"name": "stoa_security", "arguments": {"action": "check_permissions", "api_id": "billing-api", "action_type": "write"}}

// List security policies
{"name": "stoa_security", "arguments": {"action": "list_policies", "policy_type": "rate_limit"}}

Error Handling​

All tools return errors in a consistent format:

{
"error": {
"code": "SUBSCRIPTION_NOT_FOUND",
"message": "No active subscription found for api_id: billing-api",
"details": {
"api_id": "billing-api",
"tenant": "acme"
}
}
}

Common Error Codes​

CodeDescription
UNAUTHORIZEDInvalid or missing authentication
FORBIDDENInsufficient permissions
NOT_FOUNDResource not found
SUBSCRIPTION_NOT_FOUNDNo active subscription
QUOTA_EXCEEDEDRate limit or quota exceeded
VALIDATION_ERRORInvalid request parameters
INTERNAL_ERRORServer-side error

Tenant-Specific Tools​

Beyond platform tools, each tenant can register custom MCP tools for their APIs. These appear with a prefix:

{tenant}__{api-name}__{tool-name}

Example for the OASIS gaming tenant:

  • oasis__Avatar-API__search-players
  • oasis__Economy-API__transfer-coins
  • oasis__Quests-API__create-quest

Use stoa_tools with action: list to discover available tenant tools.

Cookies and privacy

With your permission, we use cookies to measure visits and understand navigation to improve the site.

Learn more

Google Analytics measures visits and useful clicks. Microsoft Clarity provides masked interaction replays. No advertising use. Your choice is saved for six months. You can change or withdraw it at any time using the “Cookies” button.

Read the audience measurement details