get_session_status
Check the current status and state of a Jules coding session to monitor autonomous coding tasks like bug fixes, refactoring, and tests.
Instructions
Get the current status and state of a Jules session
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID |
Implementation Reference
- src/mcp/tools.ts:238-260 (handler)The handler function in JulesTools class that fetches the session status from the JulesClient and returns a formatted JSON response including state, next steps, etc./** * Tool: get_session_status * Polls for session status and returns current state. * @param args - The arguments for getting session status. * @returns A JSON string representing the session status. */ async getSessionStatus( args: z.infer<typeof GetSessionStatusSchema> ): Promise<string> { return this.executeWithErrorHandling(async () => { const session = await this.client.getSession(args.session_id); return { sessionId: session.id, title: session.title, state: session.state, prompt: session.prompt, repository: session.sourceContext.source, updated: session.updateTime, nextSteps: this.getNextStepsForState(session.state || 'UNKNOWN'), }; }); }
- src/mcp/tools.ts:71-73 (schema)Zod schema defining the input: session_id string.export const GetSessionStatusSchema = z.object({ session_id: z.string().describe('The ID of the session to check'), });
- src/index.ts:328-332 (registration)In the CallToolRequestSchema handler switch, validates args with schema and calls the tool handler.case 'get_session_status': { const validated = GetSessionStatusSchema.parse(args); result = await this.tools.getSessionStatus(validated); break; }
- src/index.ts:246-257 (registration)Tool registration in ListToolsRequestSchema response, defining name, description, and inputSchema.{ name: 'get_session_status', description: 'Get the current status and state of a Jules session', inputSchema: { type: 'object', properties: { session_id: { type: 'string', description: 'Session ID' }, }, required: ['session_id'], }, },