import { z } from 'zod';
import { defineTool } from '../toolDefinition.js';
import { AgentToolNames } from '../shared/agentToolNames.js';
export const getDataTableDetailsParamsSchema = z.object({
    datatable_id: 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.
 */
export const getDataTableDetailsResponseSchema = z.object({
    id: z.string(),
    name: z.string(),
    description: z.string().optional(),
    variable_names: z.array(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: z
        .array(z.object({
        id: z.string(),
        name: z.string(),
        variables: z.record(z.string(), 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.',
    }),
});
export const GetDataTableDetailsToolDefinition = defineTool({
    name: 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: getDataTableDetailsParamsSchema,
    responseSchema: getDataTableDetailsResponseSchema,
});
//# sourceMappingURL=GetDataTableDetailsDefinition.js.map