Skip to main content
Glama
perforce

Perforce P4 MCP Server

Official
by perforce

query_streams

List, view, and analyze Perforce streams: inspect stream specs, hierarchy, integration status, workspaces, file validation, and interchanges.

Instructions

Query streams: list, get spec, children/parent/graph, integration status, workspaces, validate files, check resolve, interchanges (READ permission)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userNoFilter workspaces by user (list_workspaces)
limitNoMax changelists (interchanges)
actionYesStream query action: 'list' streams, 'get' stream spec, 'children'/'parent'/'graph' of a stream, 'integration_status' (p4 istat), 'get_workspace'/'list_workspaces', 'validate_file'/'validate_submit' against stream view, 'check_resolve' for pending spec conflicts, 'interchanges' between streams
fieldsNoFields to return for 'list' (e.g. ['Stream', 'Owner', 'Name', 'Type'])
filterNoFilter expression string for 'list' (-F flag). Supports &, |, and parentheses. E.g. 'Parent=//Ace/MAIN&(Type=development|Type=release)'
reverseNoReverse comparison direction (interchanges)
templateNoTemplate workspace for get_workspace
unloadedNoInclude unloaded streams/workspaces
at_changeNoChangelist number for historical stream spec
viewmatchNoSingle depot file path to filter streams whose views contain this path
workspaceNoWorkspace name for get_workspace, validate_file, validate_submit
changelistNoChangelist for validate_submit
file_pathsNoFile paths for validate_file or interchanges
all_streamsNoInclude virtual streams in 'list' results
long_outputNoFull changelist descriptions (interchanges)
max_resultsNoMaximum number of results to return. Bounds 'list' and 'list_workspaces' and also caps 'children' via 'p4 streams -m N'. Omit for unbounded results.
stream_nameNoStream depot path (e.g. '//depot/main'). Required for most actions.
stream_pathNoStream path pattern(s) for 'list' (e.g. ['//depot/...'])
force_refreshNoForce istat to assume cache is stale and search for pending integrations (-c flag)
both_directionsNoShow integration status in both directions (-a flag for integration_status)
view_without_editNoView locked stream without opening for edit (-v flag)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

With no annotations, the description must fully convey behavioral traits. It only states 'READ permission', implying read-only, but lacks details on side effects, rate limits, output format, or the fact that different actions require different parameters.

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 sentence that efficiently lists all actions, but it lacks structure (e.g., bullet points or grouping) for readability.

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 (21 parameters, 12 actions, output schema exists), the description is far too sparse. It does not clarify which parameters apply to which action, nor does it mention the return format or that the tool supports multiple disparate operations.

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 coverage is 100%, so baseline is 3. The description does not add any parameter-specific information; it only lists actions, which is already implied by the enum parameter.

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 explicitly enumerates all supported actions (list, get spec, children/parent/graph, integration status, workspaces, validate files, check resolve, interchanges) and indicates READ permission, clearly distinguishing it from sibling write tools like modify_streams.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives (e.g., query_workspaces or query_files). There is no mention of prerequisites, exclusions, or context for specific actions.

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