Skip to main content
Glama

cocos_add_audio_file

Add audio files (mp3/wav/ogg) to Cocos Creator projects by copying them to the resources folder and generating metadata for runtime loading.

Instructions

Copy an audio file (mp3/wav/ogg) into assets/resources/ + write meta.

The file is placed under resources/ so it can be loaded at runtime via resources.load(). Returns {path, rel_path, uuid}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYes
src_pathYes
rel_pathNo
uuidNo
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions copying and writing meta, implying a write operation, and notes the return format, but fails to detail permissions, error handling, or side effects like file overwriting. This leaves significant gaps in understanding the tool's behavior beyond basic functionality.

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 brief and front-loaded, with three sentences that efficiently convey core functionality and return values without unnecessary elaboration. Each sentence adds value, making it appropriately sized for the tool's complexity.

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

Completeness2/5

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

Given the tool's moderate complexity (4 parameters, no annotations, no output schema), the description is incomplete. It covers basic purpose and return format but misses parameter explanations, usage context, and behavioral details like error conditions or dependencies, leaving the agent with insufficient information for reliable use.

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%, so the description must compensate for undocumented parameters. It does not explain any of the 4 parameters (project_path, src_path, rel_path, uuid), such as their purposes, formats, or relationships. This lack of semantic detail hinders effective tool invocation.

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 the action ('Copy an audio file into assets/resources/ + write meta') and resource ('audio file (mp3/wav/ogg)'), making the purpose specific and understandable. However, it does not explicitly differentiate from sibling tools like 'cocos_add_audio_source' or 'cocos_add_resource_file', which might handle similar resources or operations, leaving some ambiguity about uniqueness.

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

Usage Guidelines2/5

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

The description provides minimal guidance, mentioning that the file is placed under resources/ for runtime loading via resources.load(), but it lacks explicit when-to-use instructions, prerequisites, or alternatives compared to siblings. No exclusions or clear context for choosing this tool over others are stated.

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/chenShengBiao/cocos-mcp'

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