Skip to main content
Glama

resources_add_report

Write base64-encoded images or binary files into the shared reports/resources folder, returning a src path for HTML tags that works in dashboard and PDF/PNG exports.

Instructions

Write an image or other binary resource into the shared reports/resources/ folder. Returns { filename, size, src, url }: embed the report's / tags with src exactly as given (e.g. <img src="resources/chart.png">); it is the only form that resolves correctly both in the dashboard viewer and in PDF/PNG export. Do not use url inside report HTML: it only works in the dashboard. Bytes are passed base64-encoded.

Input Schema

NameRequiredDescriptionDefault
filenameYesRequested filename with extension
bytes_base64YesBase64-encoded file bytes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv6.1.2

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it delivers the key behavioral gotcha: src resolves in both dashboard viewer and PDF/PNG export whereas url works only in the dashboard. It also discloses the exact return shape and that bytes are base64-encoded. It omits overwrite behavior, size limits, and permission requirements for a write tool, keeping it from a 5.

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?

Front-loads the action and destination, then the return contract, then the embed guidance, each in one tight sentence. No filler; every clause conveys a distinct, useful fact.

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?

No output schema exists, but the description enumerates the returned fields (filename, size, src, url) and explains how to consume them, which covers the return contract. For a two-required-param write tool it only leaves mutation edge cases (overwrite, limits) unstated.

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 description coverage is 100%, with both params (filename, bytes_base64) already documented, so the schema does the heavy lifting. The description only reinforces that bytes are base64-encoded and implies filename maps to the stored resource name, adding no format or constraint detail beyond the schema. Baseline 3 is appropriate.

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 (Write), resource type (image or other binary resource), and exact destination (shared reports/resources/ folder). An agent can distinguish it from sibling write tools like files_create and resources_clip_url without opening any schema.

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 explicit, actionable guidance on the returned fields: embed `src` in report HTML and never use `url` because url only resolves in the dashboard. This is clear in-tool usage direction, but it never states when to choose this tool over sibling alternatives (files_create, resources_clip_url), so it stops short of full alternative routing.

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