/ docs · functional specification

The full platform
functional reference.

Every functional area of AI API Mapper documented at implementation depth so architects, security reviewers, and platform engineers can evaluate the product with real technical context.

Runtime · Tool discovery

Runtime Tool Discovery

Purpose

This functional area exposes the list of tools available to an AI client within a tenant and client-application scope.

Main Capabilities

  • list published tools
  • filter tool visibility by tenant and client application
  • expose AI-facing tool descriptors
  • apply toolset and endpoint-level schema discovery modes
  • support discovery through REST and MCP
  • expose protocol-aware tool descriptors while keeping the AI-facing contract mapped to ExposedFieldName

How Discovery Works

Tool discovery is driven by published configuration, not by raw downstream APIs.

The Runtime only lists tools that are:

  • based on mappings that have at least one published version
  • included in active toolsets
  • assigned to the requesting client application

This keeps discovery intentional and governed.

The schema exposed during discovery is client-facing. Parameter names and response field names come from the mapping's ExposedFieldName values rather than the raw downstream SourceFieldName paths. The Runtime preserves structural information such as object nesting and array markers while presenting the mapped field taxonomy to the AI client.

The Runtime keeps source protocol information behind the descriptor so REST- and SOAP-derived tools can share the same AI-facing discovery model without exposing transport-specific execution details to the caller.

Schema Discovery Modes

Each exposed tool resolves an effective schema discovery mode before it is returned to the AI client.

The resolution order is:

  • use the endpoint-specific override when configured
  • otherwise use the toolset default

The supported modes are:

  • Full — return full MCP input and output schema definitions including descriptions and format hints for the exposed field contract
  • DataStructureOnly — return real exposed field names, nesting, array structure, and required flags, but omit descriptions and formats
  • Lazy — return a placeholder-only input schema and require a discovery round-trip before invocation

For DataStructureOnly and Lazy, the Runtime also injects the MCP meta-tool discover_tool_schema.

Discovery Hint Field

When a tool requires schema discovery guidance, the Runtime includes the _schema_discovery field in the tool's inputSchema.

This field is:

  • the only input field in Lazy mode
  • an extra optional hint field alongside the real schema in DataStructureOnly mode

The field is not a real downstream argument. It exists only to signal to the LLM that it should obtain the full schema definition through discover_tool_schema before first use unless the model already fetched and retained that schema in the current conversation.

Active Version Selection

Each mapping can have multiple versions. The Runtime applies the following selection rule when deciding which version to expose:

  • If the most recent version is Deprecated, the mapping is skipped entirely.
  • If the most recent version is Published, it is used.
  • Otherwise (e.g. the most recent version is a new draft or proposed state), the Runtime continues exposing the highest-numbered Published version. Mappings without a published version are not exposed.

This means creating a new draft or proposed version for an already-published mapping does not interrupt tool availability for existing clients. The published version continues to serve until a newer published version supersedes it or the mapping is explicitly deprecated.

Functional Value

This area gives AI clients a curated catalog instead of forcing them to inspect technical downstream API contracts directly.