I’m using the sonnet model. All screen below are done with the agent.
I have this tool
const svelteDocsTool = {
name: 'get-svelte-docs',
description:
'Read the complete Svelte documentation. Use this for any request related to Svelte.',
async processInput(_input: unknown): Promise<string> {
try {
const response = await fetch('https://svelte.dev/llms-full.txt');
if (!response.ok) {
throw new Error(`Failed to fetch docs: ${response.statusText}`);
}
const docsContent = await response.text();
// Write the docs to file
const filePath = join(projectRoot, '.personal', 'svelte-5-docs.txt');
await writeFile(filePath, docsContent, 'utf-8');
return `The Svelte documentation has been saved. Please read it from ".personal/svelte-5-docs.txt". You must read the file, it's an order.`;
} catch (error) {
if (error instanceof Error) {
throw new Error(`Failed to fetch or save Svelte docs: ${error.message}`);
}
throw error;
}
}
};
Cursor ignores the response that tells it that needs to read it from a file and just gives me outdated info:
Cursor even claims that it doesn’t have the ability to read it unless i tell it that it actually can like in the screen above
That txt file is reachable from cursor, unfortunately i can’t prove it because the list of included files is currently broken