status
Check current project state including version, active files, tasks, token usage, and checkpoint history to monitor progress and manage long-term context.
Instructions
Show current state metadata including version, active files, tasks, token usage, and checkpoint history.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "status"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/core/ProjectBrain.ts:332-384 (handler)Core handler function that retrieves project state and checkpoint history from Redis, formats a detailed status report including session info, metadata, active files, decisions, and history.
async status(): Promise<string> { const sessionId = this.ensureInitialized(); try { const state = await this.redis.getState(sessionId); const history = await this.redis.getCheckpointHistory(sessionId); const sections: string[] = []; sections.push('# Project State Status'); sections.push(''); sections.push(`Session ID: ${sessionId}`); sections.push(`Version: ${state.meta.version}`); sections.push( `Last Checkpoint: ${new Date(state.meta.last_checkpoint).toLocaleString()}` ); sections.push( `Last Access: ${new Date(state.meta.last_access).toLocaleString()}` ); sections.push( `Token Budget Used: ${state.meta.token_budget_used.toLocaleString()} / 200,000 (${( (state.meta.token_budget_used / 200000) * 100 ).toFixed(1)}%)` ); sections.push(''); sections.push(`Active Files: ${state.active_context.active_files.length}`); state.active_context.active_files.forEach((file) => { sections.push(` - ${file}`); }); sections.push(''); sections.push(`Active Decisions: ${state.active_context.active_decisions.length}`); state.active_context.active_decisions.forEach((decision) => { sections.push(` - [${decision.status}] ${decision.question}`); }); sections.push(''); sections.push(`Checkpoint History: ${history.length} versions available`); history.forEach((h, i) => { sections.push( ` ${i}. v${h.version} - ${new Date(h.timestamp).toLocaleString()} (${h.merge_duration_ms }ms, ${h.token_count} tokens)` ); }); return sections.join('\n'); } catch (error) { logger.error('Status check failed', { error, sessionId }); throw new Error(`Status check failed: ${error}`); } } - src/index.ts:100-108 (registration)Tool registration in the MCP ListToolsRequestHandler, defining the 'status' tool name, description, and empty input schema.
{ name: 'status', description: 'Show current state metadata including version, active files, tasks, token usage, and checkpoint history.', inputSchema: { type: 'object', properties: {}, }, }, - src/index.ts:152-157 (handler)Dispatch handler in the main CallToolRequestSchema handler that invokes ProjectBrain.status() and formats the MCP response.
case 'status': { const result = await this.brain.status(); return { content: [{ type: 'text', text: result }], }; }