Skip to main content
Glama

devtools-mcp

Generate Qr

generate_qr

生成二维码。默认 format='svg' 返回 SVG 矢量图字符串(纯标准库生成,可直接保存为 .svg 文件,AI agent 可直接写文件);format='png' 时返回 PNG 图片的 base64 编码和 data URI(需服务器安装 Pillow,未安装会返回提示)。content 支持 URL、纯文本、WiFi 配置(如 WIFI:T:WPA;S:网络名;P:密码;;)等任意字符串,上限 2000 字节。CPU 密集,走线程池不阻塞事件循环。

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": {
      "content": "<content>"
    },
    "name": "generate_qr"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNo"svg"(默认,返回 SVG 文本)或 "png"(返回 base64,需 Pillow)svg
contentYes要编码的内容,支持 URL、纯文本、WiFi 字符串等,不能为空

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / content / description
      Added value: +"要编码的内容,支持 URL、纯文本、WiFi 字符串等,不能为空"
    • removedInput schema / properties / content / title
      Removed value: -"Content"
    • addedInput schema / properties / format / description
      Added value: +"\"svg\"(默认,返回 SVG 文本)或 \"png\"(返回 base64,需 Pillow)"
    • removedInput schema / properties / format / title
      Removed value: -"Format"
    • removedInput schema / title
      Removed value: -"generate_qrArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden and does most of it well: it discloses the exact return shape per format, the external dependency (Pillow) and its graceful-failure behavior, a hard 2000-byte input cap, and that generation is CPU-heavy and dispatched to a thread pool so the event loop is not blocked. The only real gap is error semantics for oversize or malformed content.

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?

A dense, front-loaded paragraph where the default behavior and return type come first, followed by content semantics and performance notes. Every clause carries actionable information — dependency, limit, or concurrency — and none is filler.

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

Completeness4/5

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

For a two-parameter utility with a rich output schema, the description covers input classes, the size limit, both output encodings, and the dependency failure path. What remains unstated is failure behavior on invalid input, which is minor given the output schema already describes the success payload.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description nevertheless adds meaning beyond the schema by naming the 2000-byte limit (absent from the schema), enumerating concrete content classes including a full WiFi config example string, and tying format='png' to the Pillow requirement.

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?

States a specific verb+resource ('生成二维码') and immediately distinguishes the two output modes: SVG vector text by default versus PNG base64 + data URI. An agent knows exactly what it gets without opening the schema, and no sibling in the list (generate_uuid, convert_timestamp, etc.) overlaps with this behavior.

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?

Gives clear guidance for choosing between the two formats — svg is the default and directly writable to a .svg file, png additionally requires Pillow on the server and degrades to a message if absent. That is enough to pick a mode, though there is no explicit statement of when not to use the tool or what to do on invalid/oversize content.

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.