Runtime Consumption Patterns
Agent runtimes consume MCP tool registries through standard patterns.
Discovery Pattern
- Fetch tool registry from known endpoint
- Index tools by name, entity, and action type
- Cache registry with TTL based on
generated_attimestamp
Selection Pattern
- Parse user intent
- Match against available tool descriptions
- Rank by relevance
- Select best matching tool
Invocation Pattern
- Validate parameters against
input_schema - Check preconditions from
safety - Request confirmation if
confirmation_required - Submit approval if
approval_required - Execute tool
- Validate postconditions
- Return results
Error Handling Pattern
- Parameter validation failure → report missing/invalid parameters
- Precondition failure → report unmet preconditions
- Confirmation rejected → abort
- Rate limited → retry with backoff
- Execution failure → report error with code