research_project_continue
Resume context from a paused research project. Returns central question, recent findings with claims and sources, and open gaps. Use before new questions to avoid duplication.
Instructions
Resume context from a paused research project. Returns the central question, recent 50 findings (with their claims, sources, confidence), and all currently-open gaps. Use this BEFORE asking new questions in an existing project so you don't duplicate work.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes |
Implementation Reference
- Handler function that resumes a research project by fetching its details, the 50 most recent findings, and all open gaps.
const handleProjectContinue: McpToolHandler = async (args, ctx) => { const pool = (await ensureSchema(ctx)) as any; const id = String(args.projectId); const proj = await pool.query('SELECT * FROM research_projects WHERE id=$1', [id]); if (proj.rows.length === 0) return err('project not found'); const findings = await pool.query( `SELECT id, claim, source_kind, source_ref, confidence, evidence_url FROM research_findings WHERE project_id=$1 ORDER BY added_at DESC LIMIT 50`, [id]); const gaps = await pool.query( `SELECT id, question, why_unresolved FROM research_gaps WHERE project_id=$1 AND status='open'`, [id]); return ok(asText({ project: proj.rows[0], recent_findings: findings.rows, open_gaps: gaps.rows })); }; - Schema definition: tool named 'research_project_continue', requires projectId as a string.
name: 'research_project_continue', description: 'Resume context from a paused research project. Returns the central question, recent 50 findings (with their claims, sources, confidence), and all currently-open gaps. Use this BEFORE asking new questions in an existing project so you don\'t duplicate work.', inputSchema: { type: 'object', properties: { projectId: { type: 'string' } }, required: ['projectId'] }, }, handler: handleProjectContinue, }, - packages/core/src/mcp/research-tools.ts:258-266 (registration)Registration of research_project_continue in the RESEARCH_TOOLS array with group 'ai', mapping to handleProjectContinue handler.
{ group: 'ai', definition: { name: 'research_project_continue', description: 'Resume context from a paused research project. Returns the central question, recent 50 findings (with their claims, sources, confidence), and all currently-open gaps. Use this BEFORE asking new questions in an existing project so you don\'t duplicate work.', inputSchema: { type: 'object', properties: { projectId: { type: 'string' } }, required: ['projectId'] }, }, handler: handleProjectContinue, }, - packages/core/src/mcp/dispatcher.ts:39-46 (registration)RESEARCH_TOOLS (which includes research_project_continue) is imported and spread into the MCP registry via buildRegistry().
export function buildRegistry(): RegisteredTool[] { return [ ...OPENCORE_TOOLS, ...JOURNAL_TOOLS, ...WRITE_TOOLS, ...RESEARCH_TOOLS, ]; } - Helper functions used by handleProjectContinue: ok() wraps text result, err() wraps error result, asText() serializes output.
function ok(text: string): McpToolResult { return { content: [{ type: 'text', text }] }; } function err(text: string): McpToolResult { return { content: [{ type: 'text', text }], isError: true }; } function asText(p: unknown): string { return typeof p === 'string' ? p : JSON.stringify(p, null, 2); } function searchHeaders(): Record<string, string> { const h: Record<string, string> = { 'Content-Type': 'application/json' }; if (SEARCH_KEY) h['Authorization'] = `Bearer ${SEARCH_KEY}`; return h; }