export function extractSingleTextContent(data) {
    if (data &&
        typeof data === 'object' &&
        'content' in data &&
        Array.isArray(data.content)) {
        const content = data.content;
        if (content.length === 1 &&
            content[0] &&
            typeof content[0] === 'object' &&
            'type' in content[0] &&
            content[0].type === 'text' &&
            'text' in content[0] &&
            typeof content[0].text === 'string') {
            return content[0].text;
        }
    }
    return undefined;
}
//# sourceMappingURL=tool-result.js.map