Skip to main content
Glama

test_code_file

Submit ServiceNow code and receive a complete expert test plan. Analyze, structure, and present test cases for approval before execution.

Instructions

One-shot shortcut: user provides code (or file content), get back a full expert test plan immediately.

Combines analyze_for_testing + create_test_plan in one call. The plan is still presented for approval before running — call run_approved_tests to execute.

Use this when:

  • User says "test this code" and pastes a script

  • User uploads a .js file and asks to test it

  • User provides a Script Include, Business Rule, or REST script directly

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe full script/code content to test
artifact_nameNoName for this artifact in the test planProvided Script
artifact_typeNoOverride auto-detected artifact type
priorityNoall
Behavior4/5

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

With no annotations, the description carries full burden. It discloses that the plan is presented for approval and that run_approved_tests must be called to execute. It does not mention side effects or safety, but the workflow is clear.

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 concise: a brief purpose, a note about the approval flow, and clear usage examples. Every sentence earns its place without redundancy.

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?

Given the tool is a composite, the description explains the flow and inputs well. No output schema exists, and the description does not detail the test plan structure, but for the intended use (generating a plan for approval) it is sufficient.

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 75% (per context) and the description adds some context (e.g., 'code or file content' aligns with code param, artifact type examples match enum). However, it doesn't significantly deepen understanding beyond the schema.

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 clearly states the tool's purpose: a one-shot shortcut that combines analyze_for_testing and create_test_plan to generate a full expert test plan from code. It distinguishes itself from siblings by being a composite operation and explicitly mentions it does not run tests.

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 explicit use cases: when a user says 'test this code', uploads a .js file, or provides a script include, business rule, or REST script. It implies alternatives (separate analyze and plan tools) but doesn't explicitly state when not to use the tool.

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/pinnintisagarSB/ServiceNow-Dev-MCP'

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