Skip to main content
Glama

Upload attachment

servicenow_upload_attachment

Upload files as attachments to ServiceNow table records using a local path or inline base64 data for JSON-only MCP callers.

Instructions

Upload a file as an attachment on a table record.

Accepts either a server-local file_path (back-compat) or inline base64-encoded data (via AttachmentModel) — the latter is written to a temp file server-side for the upload and cleaned up afterward, so JSON-only MCP tool callers can upload without a filesystem path.

:param file_path: Path to a file on disk to upload. Mutually exclusive with data; takes precedence if both are given. :type file_path: str or None

:raises MissingParameterError: If table_name, table_sys_id, or file_name is missing, or if neither file_path nor data is provided.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathNo
params_jsonNo{}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.4.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly=false, destructive=false, idempotent=false, and openWorld=true. Beyond that, the description discloses a non-obvious implementation trait: inline base64 data is written to a temp file server-side and cleaned up afterward. It also names the error condition (MissingParameterError) when required identifiers are missing, adding real behavioral context.

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 the core purpose, then the two input modes, then parameter and error detail. The Sphinx-style :param/:raises blocks are slightly heavy for a tool description but every line carries information rather than filler.

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

Completeness3/5

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

There is no output schema, yet the description never says what is returned (e.g. the created attachment sys_id). Combined with 0% schema coverage and an undocumented params_json envelope, an agent still lacks the shape of the call despite the useful mode and error disclosures.

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 0% and the top-level schema exposes only file_path and an opaque params_json blob. The description documents file_path semantics well (mutually exclusive with data, precedence when both supplied) and names table_name, table_sys_id, file_name, and data, which evidently travel inside params_json — but it never explains params_json itself, leaving the actual envelope undocumented.

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?

States a specific verb and resource — 'Upload a file as an attachment' — plus the target ('on a table record'), which is more than the name alone conveys. It does not explicitly distinguish itself from sibling attachment tools (get_attachment, delete_attachment), so it lands just short of a 5.

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

Usage Guidelines3/5

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

The description explains the two input modes and when each is appropriate (server-local path for back-compat, inline base64 for JSON-only MCP callers), which is genuine conditional guidance. However, there is no guidance on when to use this tool versus alternatives, no prerequisites, and no exclusions.

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