Function getToolNameForModel

  • Resolves the model-facing name for a tool, given its name, client, and agent context. This is the main exported function for external usage.

    Parameters

    • toolName: string

      The registered tool identifier.

    • clientId: string

      The client session identifier.

    • agentName: string

      The agent identifier.

    Returns Promise<string>

    The name of the tool as presented to the model.

    const modelToolName = await getToolNameForModel("search-tool", "client-123", "assistant-agent");