Skip to main content
Glama

get_context_for_action

Fetch constraints, decisions, bugs, co-edits, related facts, and risk score for a file before performing an edit, create, delete, or refactor action.

Instructions

Pre-action context bundle: constraints, decisions, bugs, co-edits, related facts, and risk score for a file before editing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
action_typeYes
Behavior3/5

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

The description lists return components (constraints, decisions, bugs, etc.) but does not state whether the operation is read-only, requires authentication, or has side effects. With no annotations, this gap reduces transparency.

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 a single, well-structured sentence that front-loads the tool's purpose and lists components clearly. No superfluous words.

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

Completeness3/5

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

While the description lists what the tool returns, it does not address the format of the risk score or how the context bundle varies by action_type. The enum includes create, delete, refactor, but the description implies only editing, leaving completeness gaps.

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

Parameters2/5

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

Schema description coverage is 0%, and the description does not explain either parameter. The phrase 'for a file' hints at file_path, but action_type is completely omitted, leaving its meaning to the schema alone.

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

Purpose4/5

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

The description clearly states it provides a bundle of context items (constraints, decisions, bugs, etc.) for a file before an action. However, it only mentions 'editing' while the action_type parameter allows create, delete, and refactor, causing a slight misalignment.

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?

Use is implied by 'pre-action' and 'before editing', but no explicit guidance on when to prefer this bundle over individual context tools (e.g., get_constraints, get_decision_log) is given.

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/SaravananJaichandar/world-model-mcp'

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