import { z } from 'zod';
import { defineTool } from '../toolDefinition.js';
import { AgentToolNames } from '../shared/agentToolNames.js';
export const fetchSkillsParamsSchema = z.object({
    skill_names: z
        .array(z.string())
        .min(1)
        .meta({
        description: 'Exact names of the skills to fetch (matched literally, not by semantic search). ' +
            'Names MUST be from the list of available skills shown in this tool description — copy them verbatim. ' +
            'Pass multiple names in one call to fetch several skills at once instead of making separate calls.',
    }),
});
export const fetchSkillsResponseItemSchema = z.object({
    skill_name: z.string().meta({
        description: 'The name of the fetched skill',
    }),
    skill_title: z.string().meta({
        description: 'The title of the skill',
    }),
    skill_instructions: z.string().meta({
        description: 'The detailed instructions for using the skill',
    }),
});
export const fetchSkillsResponseSchema = z.object({
    skills: z.array(fetchSkillsResponseItemSchema).meta({
        description: 'The fetched skills, in the same order as the input skill_names.',
    }),
    unknown_skill_names: z.array(z.string()).meta({
        description: 'Names from the input that did not match any registered skill. Empty when all names resolved. ' +
            'When non-empty, double-check spelling against the available skills list — names use underscores, not hyphens.',
    }),
});
/**
 * Creates a FetchSkills tool definition with the given description.
 * The description is dynamic based on registered skills, so we export
 * a factory function rather than a static definition.
 */
export function createFetchSkillsToolDefinition(description) {
    return defineTool({
        name: AgentToolNames.FetchSkills,
        description,
        argumentsSchema: fetchSkillsParamsSchema,
        responseSchema: fetchSkillsResponseSchema,
    });
}
//# sourceMappingURL=FetchSkillsDefinition.js.map