"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toolNameFor = void 0;
const tslib_1 = require("tslib");
const snakeCase_1 = tslib_1.__importDefault(require("lodash/snakeCase"));
/**
 * The discovery/query tools reference each other by name in their prose
 * descriptions, and the agent and MCP runtimes expose the same tools under
 * different names — so a description must use the names of the runtime it is
 * rendered for, or it points the model at a tool that does not exist.
 *
 * The MCP name is the framework's own rule, `snakeCase(canonicalName)` (see
 * `toolDefinitionWith[out]McpOutput`), so we reuse it rather than hardcode a
 * second copy. The one exception is the chart tool: `generateVisualization` on
 * the agent, `render_chart` on MCP.
 */
const toolNameFor = (canonicalName, runtime) => {
    if (runtime === 'agent')
        return canonicalName;
    return canonicalName === 'generateVisualization'
        ? 'render_chart'
        : (0, snakeCase_1.default)(canonicalName);
};
exports.toolNameFor = toolNameFor;
//# sourceMappingURL=discoveryToolNames.js.map