Skip to main content
Glama
mfa-servicenow-mcp

mfa-servicenow-mcp

by jshsakura

search_server_code

Search ServiceNow server-side code by keyword across script includes, business rules, ACLs, and other supported types to find implementations and references.

Instructions

Fast keyword search across 22 server-side code types (SI/BR/ACL). Portal regex+snippets: search_portal_regex_matches.

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": {
      "query": "<query>"
    },
    "name": "search_server_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
queryYesText to search in names, identifiers, and source fields
scopeNoOptional scope filter
updated_byNoOptional updated_by filter
source_typeNoSource type to search; 'all' covers every supported type.all
max_snippet_lengthNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.25.19
    • changedInput schema / properties / source_type / enum
      Previous value: -[
      -  "all",
      -  "script_include",
      -  "widget",
      -  "angular_provider",
      -  "business_rule",
      -  "client_script",
      -  "catalog_client_script",
      -  "ui_action",
      -  "ui_script",
      -  "ui_page",
      -  "ui_macro",
      -  "scripted_rest",
      -  "fix_script",
      -  "scheduled_job",
      -  "script_action",
      -  "email_notification",
      -  "acl",
      -  "transform_script",
      -  "processor",
      -  "sp_header_footer",
      -  "sp_css",
      -  "ng_template",
      -  "update_xml"
      -]New value: +[
      +  "all",
      +  "script_include",
      +  "widget",
      +  "angular_provider",
      +  "business_rule",
      +  "client_script",
      +  "catalog_client_script",
      +  "ui_action",
      +  "ui_script",
      +  "ui_page",
      +  "ui_macro",
      +  "ui_policy",
      +  "scripted_rest",
      +  "fix_script",
      +  "scheduled_job",
      +  "script_action",
      +  "email_notification",
      +  "acl",
      +  "transform_script",
      +  "processor",
      +  "sp_header_footer",
      +  "sp_css",
      +  "ng_template",
      +  "sp_theme",
      +  "sp_portal",
      +  "ux_theme",
      +  "ux_style",
      +  "update_xml"
      +]
  2. Changed1 schema field changedv1.25.8
    • addedInput schema / properties / query / description
      Added value: +"Text to search in names, identifiers, and source fields"
  3. First observedv1.18.41

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full load. It discloses that matching is keyword-based (contrasted with regex in the sibling) and that results carry snippets, which is helpful. It omits case sensitivity, match semantics across name vs. source fields, result limits/pagination, and whether the search is read-only against production data.

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?

Two terse sentences, front-loaded with the capability and followed by the sibling pointer; nothing is padded. The telegraphic 'SI/BR/ACL' abbreviation and the two-part colon construction are slightly terse but not wasteful.

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?

For a 6-parameter search tool with no annotations and no output schema, the description covers the search domain and the sibling split but leaves return shape, default result count, and the filter parameters unexplained. It is adequate to start a call but not to predict results or tune filters.

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 67%, with descriptions on query, scope, source_type and an enum for source_type. The description adds the important nuance that matching happens in 'names, identifiers, and source fields' via the schema, and that the searched universe is server-side code types. It says nothing about the meaning of scope, updated_by, limit, or max_snippet_length beyond their names.

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 ('keyword search across server-side code types') and even gives the common abbreviations SI/BR/ACL. It names the sibling it is not (search_portal_regex_matches), so the agent can separate the two. Minor precision loss: it says 22 types while the enum exposes ~27, and the abbreviation style assumes the reader knows ServiceNow record types.

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 second clause explicitly routes portal regex/snippet work to search_portal_regex_matches, which is genuine when-not guidance for one case. There is no guidance for the main case though: nothing says when to prefer this over sn_query, download_app_sources, get_widget_bundle, or manage_script_include when looking at code.

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