Skip to main content
Glama
workspace-json

@workspacejson/codex-mcp

Official

Get workspace intelligence for a file

workspace_get_file_context
Read-onlyIdempotent

Retrieve file fragility and co-change partners from workspace.json to ensure safe edits by identifying error-prone files and related files modified together.

Instructions

Return behavioral intelligence about a single file from workspace.json BEFORE you edit it.

Combines two signals the current source tree cannot reveal on its own:

  • Fragility: whether this file is historically error-prone / high blast radius, with reason and evidence when available.

  • Co-change: which other files have historically been edited together with this one.

Call this before editing or creating a file. Treat a fragile result as a reason to make minimal, well-tested changes; treat co-change partners as candidates for related edits.

Args:

  • path (string): repo-relative or absolute file path.

Returns JSON: { "path": string, "fragile": boolean, "fragility": { "reason"?: string, "score"?: number, "evidence"?: string[] } | null, "coChangePartners": string[], "indexed": boolean, // whether the file appears in the workspace file index "workspaceVersion": string | null }

Returns fragile:false with empty partners when the file has no recorded history (this is a real answer, not an error).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe file path to look up. Absolute or repo-relative both work (matched on suffix). Example: 'src/db/client.ts'.
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds value by detailing the two signal types (fragility and co-change) and explaining that 'fragile:false with empty partners' is a valid, non-error response. No contradictions.

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 well-structured with bullet points and clear sections. Every sentence serves a purpose, and the length is appropriate for the complexity.

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

Completeness5/5

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

Despite no output schema, the description provides a detailed return JSON structure and explains edge cases (no history, file not indexed). It is complete for a read-only informational tool.

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% and already describes the path parameter well. The description does not add additional semantics beyond restating the parameter. Baseline 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 clearly states the tool returns 'behavioral intelligence' about a single file, combining fragility and co-change signals. It distinguishes itself from siblings like workspace_assess_change and workspace_list_fragile_files.

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 explicitly says 'Call this before editing or creating a file' and provides guidance on interpreting results (minimal changes for fragile, treat co-change partners as candidates). It lacks explicit exclusion of when not to use, but the context is clear.

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/workspace-json/codex-mcp'

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