Skip to main content
Glama

qrcode

Create QR codes from text or URLs for sharing information. This tool generates scannable images to encode data for easy access.

Instructions

Generate a QR code image ($0.001)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText or URL to encode
sizeNo

Implementation Reference

  • index.js:36-36 (registration)
    The "qrcode" tool is registered in the TOOLS array with its schema and endpoint definition.
    { name: 'qrcode', description: 'Generate a QR code image', inputSchema: { type: 'object', properties: { text: { type: 'string', description: 'Text or URL to encode' }, size: { type: 'number', default: 300 } }, required: ['text'] }, endpoint: '/qrcode', price: '$0.001' },
  • index.js:50-79 (handler)
    The `callTool` function serves as the generic handler that executes the API call for any tool, including "qrcode", based on the endpoint defined in the TOOLS array.
    async function callTool(endpoint, params) {
      const fetch = (await import('node-fetch')).default;
      const isGet = ['GET'].includes((TOOLS.find(t => t.endpoint === endpoint) || {}).method);
      
      const url = isGet 
        ? `${BASE_URL}${endpoint}?${new URLSearchParams(params)}`
        : `${BASE_URL}${endpoint}`;
      
      const res = await fetch(url, {
        method: isGet ? 'GET' : 'POST',
        headers: {
          'Content-Type': 'application/json',
          'Authorization': `Bearer ${API_KEY}`,
        },
        body: isGet ? undefined : JSON.stringify(params),
      });
      
      const text = await res.text();
      let data;
      try { data = JSON.parse(text); } catch { data = { raw: text }; }
      
      if (!res.ok) {
        if (res.status === 402) {
          throw new Error(`Insufficient credits. Add credits at https://iteratools.com. Cost: ${TOOLS.find(t=>t.endpoint===endpoint)?.price || 'see docs'}`);
        }
        throw new Error(`API error ${res.status}: ${text.substring(0, 200)}`);
      }
      
      return data;
    }
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 only provides pricing information ($0.001) but omits critical details like output format (PNG/JPG), return type (URL vs base64 vs binary), and whether the generated image is persisted or transient.

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 extremely concise with no wasted words, though the parenthetical cost information slightly disrupts the functional clarity and might be better placed in annotations.

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?

Without an output schema, the description should specify what the tool returns (e.g., image URL, base64 data, file path). It also leaves the 'size' parameter undocumented, making the definition incomplete for an image generation tool where output specifications are critical.

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?

The schema has 50% description coverage (only 'text' is documented). The description fails to compensate for the undocumented 'size' parameter or add context about valid size ranges, units (pixels), or behavior when size is omitted despite the default value in schema.

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 tool generates a QR code image with a specific verb and resource. However, it does not explicitly differentiate from sibling tools like 'image_generate' or 'url_shorten' that could serve similar use cases for encoding data or sharing links.

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 no guidance on when to prefer this tool over alternatives such as 'image_generate' or 'url_shorten', nor does it mention prerequisites, input constraints (e.g., maximum text length), or error conditions.

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/fredpsantos33/itera-tools-mcp'

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