Skip to main content
Glama
perforce

Perforce P4 MCP Server

Official
by perforce

query_reviews

List and query Perforce reviews with filters for state, keywords, projects, and pagination. Retrieve details, comments, files, activity, and transitions for specific reviews.

Instructions

Get review details and list reviews (READ permission). Open review - state is 'approved but pending=true' or 'needsReview' or 'needsRevision'. Closed review - state is 'approved but pending=false' or 'rejected' or 'archived'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNoReview ID to seek to for pagination (list action). Reviews up to and including this ID are excluded.
stateNoFilter by review state(s) (list action). Valid: needsRevision, needsReview, approved, approved:isPending, approved:commit, approved:notPending, rejected, archived
actionYesReview query action: list all reviews, dashboard for current user, get specific review, transitions, files_readby, files, comments, activity
fieldsNoList of fields to return for list/get actions
keywordsNoSearch keyword(s) to filter reviews (list action). Use with keywords_fields.
projectsNoFilter by project name(s) (list action)
review_idNoReview ID - required for get, transitions, files_readby, files, comments, activity actions
up_votersNoList of up voters for transitions action
to_versionNoEnding version for files action
max_resultsNoMaximum number of results to return
from_versionNoStarting version for files action
result_orderNoSet to 'updated' to return most recently updated reviews first (list action)
after_updatedNoReturn reviews updated on the day before this date/time in seconds since epoch (list action). Mutually exclusive with 'after'.
comments_fieldsNoComma-separated list of fields to return for comments actionid,body,user,time
keywords_fieldsNoFields to search keywords in (list action). Valid: changes, author, participants, hasReviewer, description, updated, projects, state, testStatus, pending, groups, id
include_transitionsNoInclude allowed state transitions in get action response

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations, the description carries full behavioral disclosure burden. It explains open vs closed states and permission, which is helpful. However, it does not disclose other behavioral traits like pagination, action-specific behavior, or result structure. The schema covers parameters but not behavior.

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?

The description is very concise—two sentences. The first sentence states purpose, the second adds valuable state definitions. No unnecessary wording.

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

Completeness2/5

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

Given the tool's complexity (16 parameters, 1 required, multiple actions, output schema exists), the description is too sparse. It does not guide how to use different actions (list, get, etc.) or differentiate from other query_ tools. Significant gaps remain.

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 baseline is 3. The description does not add parameter-specific meaning beyond what the schema provides. The state definitions in description are about values, not parameters.

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 clearly states the tool's purpose: 'Get review details and list reviews (READ permission).' It distinguishes from sibling tools like modify_reviews (for writing) and other query_ tools for different resources.

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 implies read-only usage via '(READ permission)' but does not explicitly state when to use this tool vs alternatives like modify_reviews or other query tools. No exclusions or when-not-to-use guidance is provided.

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/perforce/p4mcp-server'

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