Skip to main content
Glama

Upload Attachment

servicenow_upload_attachment

Upload a file to a ServiceNow record by specifying the table, record sys_id, file name, content, and MIME type. Supports text and base64 binary content with optional encryption.

Instructions

Upload a file as an attachment to a ServiceNow record.

Args:

  • table_name (string): Table of the parent record (e.g., incident, change_request)

  • table_sys_id (string): sys_id of the parent record

  • file_name (string): Name for the file (e.g., "report.txt", "screenshot.png")

  • content (string): File content (text for text files, base64 for binary files)

  • content_type (string): MIME type (e.g., "text/plain", "application/json", "image/png")

  • encrypt (boolean): Encrypt the attachment at rest (default: false)

Returns: The created attachment record with sys_id and download link

Examples:

  • Attach a log file to an incident → table_name="incident", table_sys_id="...", file_name="server.log", content="...", content_type="text/plain"

  • Attach JSON config → file_name="config.json", content_type="application/json"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesFile content (text as-is, binary as base64)
encryptNoEncrypt attachment at rest
file_nameYesFilename including extension
table_nameYesServiceNow table name (e.g., incident, change_request, sys_user)
content_typeNoMIME type of the file (default: text/plain)text/plain
table_sys_idYesServiceNow sys_id (32-character GUID) of the record
response_formatNoOutput format: 'markdown' (default) for human-readable or 'json' for structured datamarkdown
Behavior4/5

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

Annotations already signal a write operation (readOnlyHint=false) and non-destructive intent (destructiveHint=false), so the bar is lower. The description adds valuable context: content encoding rules (text vs base64), MIME type examples, default encryption behavior, and the return value (created attachment record with sys_id and download link). It does not contradict annotations and goes beyond them.

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 well-structured with a one-line purpose, an Args list, Returns, and Examples. Each section is compact and information-dense, with no filler. The examples are concise and illustrate two common use cases. It earns every sentence.

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 file-upload tool with several parameters and no output schema, the description covers key aspects: return value, examples, and encoding guidelines. However, it omits the response_format parameter entirely and doesn't mention any limitations (e.g., file size, permission requirements). These gaps leave the agent slightly under-informed for complex scenarios.

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%, giving a baseline of 3. The description goes beyond by explaining content encoding (text as-is, binary base64), providing MIME type examples, and clarifying table_sys_id as sys_id. It also shows practical parameter combinations in examples, which adds meaning beyond the schema alone.

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 opens with a specific verb+resource+object: 'Upload a file as an attachment to a ServiceNow record.' This clearly distinguishes it from sibling tools like list_attachments and get_attachment_content, which are read-only operations. The scope is 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 clear usage context through concrete examples (e.g., attaching a log file to an incident, attaching JSON config) that imply when to use this tool. However, it does not explicitly state when not to use it or name alternative tools for similar tasks, so it misses exclusions but covers context well.

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/kylburns89/servicenow-mcp-server'

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