Skip to main content
Glama

连接 Creator 工程

cocos_project_connect

Connects to a Cocos Creator project backend via an absolute project path, reusing or starting the backend without opening the editor or login. Returns project and instance IDs.

Instructions

兼容显式连接入口;普通工程工具可直接传 workspacePath 或 projectPath 自动连接。此入口使用绝对工程路径,复用或启动工程后端,不启动编辑器或登录,返回工程与实例标识。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "projectPath": "<projectPath>"
    },
    "name": "cocos_project_connect"
  }
}

Input Schema

NameRequiredDescriptionDefault
instanceIdNo
projectPathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only give readOnlyHint=false, destructiveHint=false and openWorldHint=false. The description adds real behavioral context beyond that: it reuses or starts a project backend, does not launch the editor, does not require login, and returns project plus instance identifiers. It does not cover idempotency, whether a disconnect is later required, or failure modes when the path is invalid.

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?

A single dense sentence, front-loaded with the compatibility note and followed by the concrete behaviors and return values. Nothing is redundant, though the opening clause '兼容显式连接入口' is abstract relative to the more useful clauses that follow.

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?

For a tool with no output schema, the description usefully states what is returned (project and instance identifiers) and what side effects occur. The gap is the undocumented instanceId parameter and the absence of any guidance on lifecycle (disconnect, status checks) after connecting.

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 0%, so the description carries the full burden. It adds meaning for projectPath by requiring an absolute path, but the second parameter instanceId is never mentioned anywhere in the description or schema, leaving its purpose undocumented.

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 states a concrete verb and resource (explicitly connect a Creator project) and scopes it with 'absolute project path'. It also distinguishes itself from the implicit path used by 'ordinary project tools', so an agent can tell when this entry exists versus auto-connect. It stops short of naming a specific sibling tool it replaces.

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 explicitly says the ordinary project tools can pass workspacePath/projectPath and auto-connect, implicitly telling the agent this tool is the explicit/compatibility path rather than the default. There is no explicit statement of when this entry must be chosen over auto-connect, nor any mention of the disconnect/status siblings.

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