export const resolveDescription = (description, runtimeName) => typeof description === 'function' ? description(runtimeName) : description;
export const assertAvailable = (name, availability, runtime) => {
    if (!availability.includes(runtime)) {
        throw new Error(`Tool "${name}" is not available in the ${runtime} runtime`);
    }
};
export const defaultAgentToModelOutput = ({ output }) => output.metadata.status === 'error'
    ? { type: 'error-text', value: output.result }
    : { type: 'text', value: output.result };
const text = (textContent) => ({
    content: [{ type: 'text', text: textContent }],
});
const error = (textContent) => ({
    isError: true,
    content: [{ type: 'text', text: textContent }],
});
const structured = (textContent, structuredContent) => ({
    content: [{ type: 'text', text: textContent }],
    structuredContent,
});
export const createMcpToolResultBuilders = () => ({
    text,
    error,
    structured,
});
//# sourceMappingURL=toolDefinitionUtils.js.map