Skip to main content
Glama

Attach images to a report

attach_image

Add existing PNG, JPEG, GIF, or WebP images to a bug report from local paths, globs, or URLs; each image is copied into the local store and appended for annotation.

Instructions

Add existing images (PNG, JPEG, GIF or WebP) to a bug report, for example a screenshot you saved or a diagram from a URL. Use attach_file instead for logs, videos or other non-image files, and request_screenshot when the user has to take the picture. Copies each image into bugcap's local store (URLs are downloaded) and appends it to the report; existing media is kept. Notes can then refer to it as @i or @label. Returns {"added": [{index, label, kind, size_bytes, source}], "rejected": [{source, reason}]}: one bad source does not stop the others.

Input Schema

NameRequiredDescriptionDefault
idYesNumeric report id, as returned by list_reports (e.g. 12).
labelsNoOptional short names, one per entry in `sources` and in the same order; use null to leave one unlabeled. A label lets notes refer to the item as @label.
sourcesYes1 to 20 images to add: local file paths, glob patterns (e.g. 'shots/*.png') or http(s) URLs to download.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.7.2
    • addedInput schema / properties / id / description
      Added value: +"Numeric report id, as returned by list_reports (e.g. 12)."
    • addedInput schema / properties / labels / description
      Added value: +"Optional short names, one per entry in `sources` and in the same order; use null to leave one unlabeled. A label lets notes refer to the item as @label."
    • addedInput schema / properties / sources / description
      Added value: +"1 to 20 images to add: local file paths, glob patterns (e.g. 'shots/*.png') or http(s) URLs to download."
  2. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=true), and the description adds real behavior beyond them: images are copied into a local store, URLs are downloaded, existing media is preserved, and partial failure is tolerated. It also discloses the reference convention (@i<n> or @label) that the agent needs for later note updates.

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?

Front-loaded with purpose and alternatives, then behavior — good ordering with no filler sentences. Slightly over-packed because it spells out the full return JSON shape, which the output schema already provides.

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

Completeness5/5

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

With annotations covering safety, full schema coverage, and an output schema present, the description supplies everything else an agent needs: accepted formats, source kinds, mutation semantics, partial-failure behavior, and the labeling convention. Nothing required for correct invocation is missing.

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 schema already documents id, labels and sources. The description still adds value by explaining how labels are consumed downstream (notes referring to @label) and that source failures are per-item rather than all-or-nothing, though it does not restate the 1-20 item or glob limits.

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 (add/attach) and resource (existing images) with the accepted formats and scope (into a bug report). It explicitly distinguishes itself from attach_file and request_screenshot, so an agent can pick correctly among siblings without opening schemas.

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

Usage Guidelines5/5

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

Names both alternatives and the exact condition that selects each: attach_file for logs/videos/non-image files, request_screenshot when the user must take the picture. No exclusions are left to inference.

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