Skip to main content
Glama

get_platform_snippet

取一套配色的可直接粘贴代码片段,按目标平台生成:Android colors.xml、iOS UIColor、Flutter Color、小程序 wxss、CSS 变量、SCSS 变量、Tailwind 配置。

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": {
      "slug": "<slug>",
      "target": "<target>"
    },
    "name": "get_platform_snippet"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNo角色文案语言,默认 zh
slugYes配色 slug,如 mo-lan-ye
targetYes目标格式:android / ios / flutter / wxss / css / scss / tailwind
platformNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the output artifact (pasteable snippets in seven formats), which is genuinely useful, but says nothing about read-only semantics, what happens when the slug does not exist, or anything about the undocumented lang/platform behavior.

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 front-loaded sentence that states the action first and then lists the supported targets with zero filler. The format enumeration is slightly redundant with the schema enum but still earns its place as a scannable list.

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?

With no output schema and no annotations, the description should carry more weight. It does explain what the return value is (pasteable snippet per platform), which is the main gap it needs to fill, but omits slug-resolution behavior, the lang effect on output, and the platform parameter's role.

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 75%, so the baseline is 3. The description restates the target formats that the enum already enumerates, adds no syntax or format detail, and never mentions lang (the copy-language switch) or platform, leaving the one undocumented parameter untouched in both places.

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 gives a clear verb+resource pair(生成代码片段)and enumerates the exact target formats produced, so an agent can tell the tool's job is to emit platform-specific snippets. It does not distinguish itself from the sibling get_css_variables, which overlaps on one of the listed formats.

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?

The enumeration of output formats implies when to call it (when you need pasteable code for a given platform), but there is no explicit when-to-use statement, no exclusion, and no mention of the get_css_variables sibling that produces a subset of the same output.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.