Skip to main content
Glama

sn_code

Read-onlyIdempotent

Search, list, read, and trace ServiceNow automation artefacts—scripts, dictionary entries, and references—to find where names are used across code or schema.

Instructions

Find the instance's own automation. action=search (scripts mentioning a string), action=list (artefacts of a kind), action=read (one artefact), action=where_used (every reference to a name; scope='code' searches only the scripts, scope='schema' only the dictionary, empty searches both).

Input Schema

NameRequiredDescriptionDefault
nameNo
textNo
limitNo
scopeNo
tableNo
actionNosearch
sys_idNo
artefactNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds useful behavioral detail about how where_used scoping narrows the search surface, but says nothing about limits, result truncation, or the cost of broad searches.

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?

A single dense sentence, front-loaded with the purpose before the action breakdown. The nested parentheses are slightly heavy but every clause carries real information.

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?

An output schema exists so return values need no explanation, and annotations cover the safety profile. But for an 8-parameter, 0%-coverage multi-action tool, the missing parameter-to-action mapping is a real gap that would cause wrong invocations.

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%, so the description must carry the load. It explains the action enum and the scope values well, but leaves name, text, limit, table, sys_id, and artefact undocumented, and never maps which parameter belongs to which action (e.g. read needs sys_id vs name).

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 ('Find') and resource ('the instance's own automation'), then enumerates all four actions with parenthetical meanings, so an agent knows what the tool does. It does not distinguish itself from siblings like sn_read or sn_schema, which prevents 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 per-action glosses imply when each action applies (search vs list vs read vs where_used), and the scope semantics ('code'/'schema'/empty) are useful. However, there is no explicit guidance on when to use sn_code instead of the sibling tools, so the agent must infer the boundary.

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