Skip to main content
Glama

mcp_set_context

Sets a default project context so later MCP tool calls that omit a project use it automatically; pass an empty value to clear the context.

Instructions

设置默认项目上下文;后续 mcp_call 未显式传 project 时使用它。传空值则清除。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "mcp_set_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
projectNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It does disclose the two most important traits — that this mutates persistent default state affecting later calls, and that null/empty removes it — but it leaves the scope ambiguous: whether the setting survives across sessions and whether it affects only mcp_call or other siblings like mcp_get/mcp_tools as well.

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?

Two short clauses with the core action front-loaded and zero filler; the clearing behavior is attached as a compact second sentence. Every part earns its place.

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?

The tool is simple (one optional parameter) and an output schema exists, so return-value explanation is unnecessary. Still, for a state-setting tool the persistence scope and breadth of effect are the key unknowns an agent needs before calling it, and neither is stated, leaving the definition adequate rather than complete.

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 0%, so the description must compensate, and it does add the non-obvious semantic that an empty/null value clears the context (rather than erroring or storing null). However, it never says what a non-empty project value should look like (project name vs. identifier vs. path), leaving the only documented string parameter underspecified.

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 a specific verb and resource ("设置默认项目上下文" / set the default project context) and immediately explains its downstream effect on mcp_call, which is the one sibling an agent would confuse it with. An agent can tell this apart from mcp_call/mcp_list without opening a schema.

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?

It gives a clear usage condition: call this so later mcp_call invocations omit an explicit project, and pass an empty value to clear. It does not explicitly frame the alternative (passing project per-call to mcp_call), but that alternative is implied by the same sentence, so guidance is clear without formal exclusions.

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