Skip to main content
Glama
servicenow-mcp

servicenow-mcp

sn_attachment_upload

Upload a local file and attach it to a specified ServiceNow record by table and sys_id, with write access required.

Instructions

Upload a local file and attach it to a ServiceNow record. This is a write tool. It refuses to run unless the server was started with SN_ALLOW_WRITE=1.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "table": "<table>",
      "sys_id": "<sys_id>",
      "file_path": "<file_path>"
    },
    "name": "sn_attachment_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
tableYesTable of the record to attach the file to. Example: incident.
sys_idYesThe sys_id of the record to attach the file to: 32 hex characters.
file_nameNoName to give the attachment. Default: the name of the local file.
file_pathYesAbsolute local path of the file to upload.
content_typeNoMIME type of the file. Default: guessed from the file extension.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false; the description adds materially useful behavior: it is a write operation and it fails early unless SN_ALLOW_WRITE=1 is set on the server. That gating detail is exactly the kind of context annotations cannot convey. It stops short of describing the failure mode beyond the flag check or the return payload, so it is not 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?

Three short sentences, front-loaded with the core action, then the write classification, then the environmental gate. No filler and no repetition of the name or schema.

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 five-parameter write tool with no output schema, the description covers purpose, mutation type, and the key environmental prerequisite. It is slightly incomplete in not indicating what is returned (such as the new attachment's sys_id) or any file-size or type constraints an agent might hit.

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% across all five parameters, so the schema already explains table, sys_id, file_name, file_path, and content_type with examples and defaults. The description adds no additional parameter meaning, which lands at the baseline for full coverage.

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 and resource: 'Upload a local file and attach it to a ServiceNow record.' This clearly separates it from the sibling attachment tools (sn_attachment_delete, sn_attachment_download, sn_attachment_list), since each has a distinct verb.

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 gives a hard prerequisite ('refuses to run unless the server was started with SN_ALLOW_WRITE=1') and identifies this as a write tool, which aids gating decisions. But it never says when to choose this over alternatives or what conditions make the upload appropriate (for example, existing attachment names or duplicate handling).

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