Society · Protocols
ToolDiscovery
Discover and invoke external tools via structured capability manifests
Definition
Mechanism
Agent queries a Discover for capabilities matching its current Task. Registry returns a Card listing available tools with typed input/output schemas. Agent selects the best match, performs a CompatibilityCheck to verify schema alignment, then invokes via ToolInvoke and observes the typed Result. If no match is found or CompatibilityCheck fails, the agent must FailClosed rather than attempt a best-effort invocation. Follows the Model Context Protocol pattern of progressive discovery under ContextFirst discipline: orient via registry, explore via schema matching, verify via hash comparison.
Preconditions
Postconditions
- Result returned conforming to tool's declared output schema
- Invocation logged with tool identity and schema hash
Invariants
- Schema Verification: Tool manifest hash must be verified via CompatibilityCheck before invocation
- Fail-Closed: On schema mismatch or missing tool, reject via FailClosed rather than attempt best-effort
- Tool output must conform to declared schema in the Card
Risks
Failure modes
Registry unavailable (no tools discoverable — must degrade gracefully).
Schema drift (tool updated its manifest but Agent cached old version).
Capability hallucination (tool claims capability it cannot deliver).
Relationships
Builds on
Composes with
Infrastructure
Schema compatibility verification
Infrastructure
Default-deny policy for uncertain states
Infrastructure
Execute external tool and observe result
References
Mind
Autonomous Goal-Directed Entity
Infrastructure
Structured capability advertisement: agent_id, endpoint, protocols, capabilities, metadata
Mind
Load state before acting
Distributed query for external resources
Infrastructure
The atomic unit of intent
Yields
Infrastructure
The output of agentic transformation
Nothing in this library builds on this pattern yet.
Reference
Signature
Discover(ToolInvoke)
