Skip to main content
Glama

mp_setDefaultProject

Set a project as the persistent default for future connections without connecting. Provide the absolute project path to save it as the default for the next connection.

Instructions

把指定项目设为持久化的默认项目;设置后下次 mp_ensureConnection 会优先用它连接。本工具只写默认值,不会自己建立连接

何时用:只想修改后续连接默认项目、暂时不建立连接时。projectPath 传 mp_listProjects 返回的 projects[].path(项目目录绝对路径);路径无效或目录不存在会返回错误,不会静默成功。 与 mp_ensureConnection 的 projectSelection 区别:projectSelection 会在当前 ensure 调用里立即选中并连接该项目,同时也保存为默认项目;本工具只保存默认项目。设完需再调 mp_ensureConnection 才真正连上。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYes
Behavior5/5

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

Discloses that it does not establish a connection on its own, only sets the default, and that invalid or non-existent paths return errors. With no annotations provided, the description fully covers behavioral traits.

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 well-structured into logical segments (purpose, usage, parameter details, distinction) but is slightly verbose. It effectively front-loads the core message.

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?

Given no output schema and no annotations, the description provides comprehensive context: behavior, parameter usage, error handling, and relationship to sibling tools. No gaps remain.

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

Parameters5/5

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

Despite 0% schema description coverage, the description adds critical meaning: projectPath is an absolute directory path from mp_listProjects projects[].path, and invalid values result in errors. This compensates fully for the lack of schema parameter descriptions.

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 sets a persistent default project, using specific verbs ('set' and 'default project'), and distinguishes it from sibling mp_ensureConnection by emphasizing it only writes the default without establishing a connection.

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

Usage Guidelines5/5

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

Explicitly indicates when to use: when only modifying the default project for future connections and not establishing a connection now. Contrasts with mp_ensureConnection's projectSelection and specifies that projectPath should come from mp_listProjects' output.

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/Chaixueyuan/weapp-agent-mcp'

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