Skip to main content
Glama

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
NameRequiredDescriptionDefault
session_idYesSession ID

Implementation Reference

  • 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'),
        };
      });
    }
  • 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'],
      },
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/savethepolarbears/jules-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server