Skip to content

feat(inference): add tool schema translation layer #78

Description

@Svagtlys

feat(inference): add tool schema translation layer

Description

Build a translation layer that converts MCP tool schemas (inputSchema in JSON Schema format) into the provider-native tools array format expected by the inference engine (e.g., OpenAI's function schema or Anthropic's tools parameter).

Why

MCP servers expose tools in MCP's JSON Schema format. The inference provider (OpenAI-compatible) expects a different schema structure. The harness must translate between the two so the LLM can understand the available tools when making completion requests.

Scope

  • Add tools field to CompletionRequest type to carry tool definitions
  • Build translator: MCP inputSchema → OpenAI-compatible function.parameters format
  • Pass translated tool definitions alongside messages in completion requests
  • Support multiple tool definitions in a single request

Depends on: #8, #15

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions