Fixing the prompts

This commit is contained in:
2026-01-31 19:20:36 -05:00
parent 0cd557a3fe
commit 8691b926fb
12 changed files with 1376 additions and 358 deletions

View File

@@ -173,11 +173,26 @@ export function getToolsForApi(
/**
* Refresh MCP tools cache
* Returns information about the refresh result for logging
*/
export async function refreshMCPTools(): Promise<void> {
export async function refreshMCPTools(): Promise<{
success: boolean;
toolCount: number;
error?: string;
}> {
try {
mcpToolsCache = await getMCPToolsForApi();
} catch {
return {
success: true,
toolCount: mcpToolsCache.length,
};
} catch (err) {
mcpToolsCache = null;
const errorMessage = err instanceof Error ? err.message : String(err);
return {
success: false,
toolCount: 0,
error: errorMessage,
};
}
}