Skip to main content
Glama

read_attachment

Read-only

Read a ServiceNow attachment and get its text content. Works for txt, csv, json, xml, html, md, and log files. Binary formats return metadata and a note. Use it to summarize or draft from an existing file.

Instructions

Read an existing ServiceNow attachment and return its text content, server-side. Works for text formats (txt, csv, json, xml, html, md, log). Binary formats (PDF, DOCX, images) return metadata plus a note. Use this to summarise or draft from a file already in ServiceNow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_charsNoMax characters of text to return (default 200000)
attachment_sys_idYessys_id of the attachment to read

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.15.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and openWorldHint=true, indicating a safe read operation. The description adds valuable behavioral context beyond annotations: it specifies that text formats are read and returned, while binary formats (PDF, DOCX, images) return metadata plus a note, and that processing is server-side. This transparently sets expectations for the tool's behavior without contradicting annotations.

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?

The description is three sentences, efficiently front-loaded with the primary action ('Read an existing ServiceNow attachment and return its text content, server-side'). It then lists supported formats and a use case, with no redundant wording. Every sentence contributes value, making it concise and well-structured.

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 read tool with readOnlyHint, the description covers the key distinction between text and binary behavior and indicates server-side processing. It does not mention output structure or error handling, but the absence of an output schema means these are less critical. Sibling tools (upload_attachment, copy_attachment) are clearly distinct. The description is sufficiently complete for an agent to call it correctly, though it could mention required parameter constraints beyond schema.

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 100%, with both parameters (attachment_sys_id and max_chars) documented with descriptions. The description does not add additional parameter semantics, such as clarifying how max_chars affects output or what constitutes a valid sys_id. It relies on the schema for parameter details, which is acceptable given full coverage, yielding a baseline score of 3.

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?

The description clearly states the tool's function: reads an attachment and returns its text content server-side. It specifies supported text formats and explains behavior for binary formats, effectively distinguishing it from siblings like get_attachment_metadata (which returns metadata) and list_attachments (which lists). The verb 'read' and resource 'attachment' are explicit, making the purpose unambiguous.

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?

The description provides a clear usage context: 'Use this to summarise or draft from a file already in ServiceNow.' It implies when to use this tool versus others (e.g., when you need text content rather than metadata). However, it doesn't explicitly state when not to use it or list alternatives, leaving some room for inference. It could be stronger by mentioning alternatives like get_attachment_metadata for metadata-only needs.

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

Deploy Server

Other Tools