Skip to main content
Glama

get_session_state

Check the current status of a Jules session to determine if it's busy, stable, or failed, and view session details like last activity, agent messages, or pending plans.

Instructions

Get the current status of a Jules session. Acts as a dashboard to determine if Jules is busy, waiting, or failed.

RETURNS: id, status, url, title, prompt, pr (if created), lastActivity, lastAgentMessage (if any), pendingPlan (if awaiting approval)

STATUS (use this to decide what action to take):

  • "busy": Jules is actively working. Peek with get_code_review_context if needed.

  • "stable": Work is paused. Safe to review code, send messages, or check outputs.

  • "failed": System-level failure (like a 500). Session cannot continue.

LAST ACTIVITY:

  • Shows what just happened (activityId, type, timestamp)

  • Common types: agentMessaged, sessionCompleted, progressUpdated, userMessaged, planGenerated

LAST AGENT MESSAGE:

  • Contains the last message Jules sent (activityId, content, timestamp)

  • Read this to understand what Jules communicated

  • If Jules asked a question, you can respond using send_reply_to_session

PENDING PLAN:

  • Present when a plan is awaiting approval (lastActivity.type is 'planGenerated')

  • Contains planId and steps (title, description for each step)

  • Use send_reply_to_session with action 'approve' to approve the plan

NEXT ACTIONS:

  • busy → Wait for completion, or peek with get_code_review_context

  • stable + pendingPlan → Review the plan steps, then approve or send feedback

  • stable + lastAgentMessage → Read message, respond if Jules asked something

  • stable + no message → Review PR or code changes with get_code_review_context

  • failed → Report to user. Session is unrecoverable.

IMPORTANT:

  • You can send messages to ANY session regardless of status.

  • A session is never truly "done" unless it's failed. You can always continue the conversation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesThe session ID (numeric string)

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/streetquant/jules-mcp'

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