Skip to main content
Glama
Menglook
by Menglook

核对 Git 远端状态

git_get_remote_state
Read-only

Read local and remote branch HEADs to calculate ahead/behind status, making no changes to the repository or remote.

Instructions

Read the exact local HEAD and remote branch head and calculate ahead/behind state without modifying the repository or remote.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchNoBranch name. Default: current branch.
remoteNoRemote name. Default: origin.
workspace_idNoOptional workspace id. When omitted, CodexPro binds the authoritative conversation workspace automatically; an explicit unknown or mismatched id is rejected.
conversation_idNoConnector conversation id bound to this workspace. Modern MCP injects it automatically; side-effecting tools require it to match the authoritative binding.
workspace_generationNoOptional authoritative workspace generation. When omitted, CodexPro injects the conversation-bound generation; an explicit stale generation is rejected.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tool_resultYes
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is established. The description adds the 'without modifying the repository or remote' guarantee, reinforcing the read-only nature. However, it doesn't disclose details like network behavior, fetch requirements (does it need a fetch to be fresh?), or what happens if remote is unreachable — meaningful behavioral gaps for a remote-interacting tool.

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

Conciseness4/5

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

The description is a single, tight sentence that front-loads the core purpose. It wastes no words on fluff. Slightly more detail could be added about remote interaction behavior, but the current form is efficient and appropriately sized.

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?

With readOnlyHint=true, destructiveHint=false, an output schema, and 100% schema coverage, the structured data is rich. The description completes the picture by stating the exact calculation (ahead/behind) and non-modification guarantee. Given the tool's moderate complexity (remote query vs. local operation), the combination is reasonably complete, though remote-unreachable behavior disclosure would push it higher.

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?

Schema description coverage is 100%, so all 5 parameters are documented in the schema. The description adds marginal context about the operation's relationship to these params (branch/remote selection for the state calculation) but doesn't add meaning beyond schema descriptions. The baseline 3 applies since the schema carries the param-documentation burden fully.

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 states the exact purpose: 'Read the exact local HEAD and remote branch head and calculate ahead/behind state' — a specific verb (read/calculate) plus resource (git remote state). It explicitly notes 'without modifying the repository or remote,' distinguishing this as a non-mutating read operation, which separates it from sibling git tools like git_commit, git_push, and git_prepare_commit.

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

Usage Guidelines3/5

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

The description clearly establishes this as a read-only operation and the title '核对 Git 远端状态' (verify git remote state) implies when to use it, but it does not explicitly state when-not-to-use it or name alternative tools. Among git siblings (git_push, git_commit, git_finalize), the read-only framing provides context, yet there's no explicit comparison to alternatives for ahead/behind analysis.

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

Install Server

Other Tools

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/Menglook/codexpro-runtime'

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