Skip to main content
Glama

Extract PR details from completed session

jules_extract_pr_from_session
Read-onlyIdempotent

Retrieve pull request details and change set (git patch, suggested commit message) from a completed Jules session. Get the PR URL, title, description, and branch refs, or the patch when no PR was created.

Instructions

Extract pull request and/or change set information from a completed Jules session's outputs. Returns the full pull request (url, title, description, baseRef, headRef) when AUTO_CREATE_PR was used, and the change set (git patch, suggested commit message) when present. Sessions that produced a patch but no PR still return their changeSet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesThe completed Jules session ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description goes well beyond the annotations by explaining conditional behavior: returns the full PR when AUTO_CREATE_PR was used, returns changeSet when present, and still returns changeSet when only a patch was produced. This gives the agent a clear model of the tool's edge cases without contradicting the readOnly/idempotent annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the primary purpose, followed by concise conditional return details. Every clause adds necessary information and there is no filler or repetition of the tool name/title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the single parameter, no output schema, and rich annotations, the description covers the key return scenarios and fields well. It could be slightly more complete by stating what happens when neither a PR nor a changeSet exists, but for a one-parameter extraction tool this is a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents session_id as 'The completed Jules session ID' with 100% coverage. The description reinforces the 'completed' aspect but adds no new parameter-level semantics beyond what the schema already provides, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: 'Extract pull request and/or change set information from a completed Jules session's outputs.' It clearly distinguishes this from sibling tools by focusing on PR/changeSet extraction rather than session retrieval or management, and it details exactly what is returned based on session conditions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context: this tool is for completed sessions and extracts PR/changeSet data. It implies when to use it (after a session is done) and what to expect, but does not explicitly mention alternatives or state when not to use it versus tools like jules_get_session or jules_get_activity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.