"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetDataTableDetailsToolDefinition = exports.getDataTableDetailsResponseSchema = exports.getDataTableDetailsParamsSchema = void 0;
var zod_1 = require("zod");
var toolDefinition_js_1 = require("../toolDefinition.js");
var agentToolNames_js_1 = require("../shared/agentToolNames.js");
exports.getDataTableDetailsParamsSchema = zod_1.z.object({
    datatable_id: zod_1.z.string().meta({
        description: 'The ID of the data table to inspect. Must be from the workspace context.',
    }),
});
/**
 * Response schema for the get_data_table_details tool.
 * Returns the table metadata, variable names (columns), and scenario summaries.
 */
exports.getDataTableDetailsResponseSchema = zod_1.z.object({
    id: zod_1.z.string(),
    name: zod_1.z.string(),
    description: zod_1.z.string().optional(),
    variable_names: zod_1.z.array(zod_1.z.string()).meta({
        description: 'The column names (variables) in this data table. These are the variable names available in test steps as {{@variable_name}}.',
    }),
    scenarios: zod_1.z
        .array(zod_1.z.object({
        id: zod_1.z.string(),
        name: zod_1.z.string(),
        variables: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).meta({
            description: 'Variable name-value pairs for this scenario (row).',
        }),
    }))
        .meta({
        description: 'The scenarios (rows) in this data table, each with its variable values.',
    }),
});
exports.GetDataTableDetailsToolDefinition = (0, toolDefinition_js_1.defineTool)({
    name: agentToolNames_js_1.AgentToolNames.GetDataTableDetails,
    description: 'Inspect a data table to see its variable names (columns) and scenarios (rows). ' +
        'Use this when planning a data-driven test to understand what variables are available ' +
        '(e.g. {{@product_name}}, {{@email}}) and what scenarios exist. ' +
        'Pick the datatable_id from the workspace context.',
    argumentsSchema: exports.getDataTableDetailsParamsSchema,
    responseSchema: exports.getDataTableDetailsResponseSchema,
});
//# sourceMappingURL=GetDataTableDetailsDefinition.js.map