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

  1. Discover accessible
  2. Task specifies required capability type

Postconditions

  1. Result returned conforming to tool's declared output schema
  2. Invocation logged with tool identity and schema hash

Invariants

  1. Schema Verification: Tool manifest hash must be verified via CompatibilityCheck before invocation
  2. Fail-Closed: On schema mismatch or missing tool, reject via FailClosed rather than attempt best-effort
  3. Tool output must conform to declared schema in the Card

Risks

Failure modes

  1. Registry unavailable (no tools discoverable — must degrade gracefully).

  2. Schema drift (tool updated its manifest but Agent cached old version).

  3. Capability hallucination (tool claims capability it cannot deliver).

Relationships

Builds on

Composes with

Infrastructure

FailClosed

Default-deny policy for uncertain states

Infrastructure

ToolInvoke

Execute external tool and observe result

References

Mind

Agent

Autonomous Goal-Directed Entity

Infrastructure

Card

Structured capability advertisement: agent_id, endpoint, protocols, capabilities, metadata

Discover

Distributed query for external resources

Infrastructure

Task

The atomic unit of intent

Yields

Infrastructure

Result

The output of agentic transformation

Nothing in this library builds on this pattern yet.

Reference

Signature

  • Discover(ToolInvoke)

Identity

Ref
ToolDiscovery#b165
Sema ID
sema:ToolDiscovery#mh:SHA-256:b1659e870015d2d6e37842f31a0bc1cc2d2d2882aaf6d0bc3b6b1236885890d7
Ring
1
Tier
1
Updated
2026-11-11
Supersedes
  • sema:ToolDiscovery#mh:SHA-256:548fb253447d270bee9b28ee7fe125135ce45ab54fbd2744fcc70e6b7d9b6de8
  • sema:ToolDiscovery#mh:SHA-256:0ff16794954587c168bc694f00a723973be11ddfeb3a15c73770ab660bd439d8
  • sema:ToolDiscovery#mh:SHA-256:bf677acdeda8699deafb4398efa1f605dea89de112873e9a7bb838a41adbffd6
  • sema:ToolDiscovery#mh:SHA-256:4b608d9d78051bf0f7bd10120d145dd6664c416fc0c52969156f9a31d171d45b
  • sema:ToolDiscovery#mh:SHA-256:c3c879478898d130c1f92f782dd17955e1dd1195638b188e3d7044428e64bb1b
  • sema:ToolDiscovery#mh:SHA-256:8d8071355a00e6bf7cf3b0d6bd509d83a2501c6a06923ce6dd6e6cf50f41918e