Skip to main content
Glama
raeseoklee

MCP Workbench MCP Server

by raeseoklee

run_spec

Execute YAML test specifications against MCP servers to validate functionality and return detailed results for reliability testing.

Instructions

Run a YAML test spec against an MCP server and return results. Provide either specText (inline YAML) or specPath (path to a file). At least one is required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specTextNoInline YAML spec content to run
specPathNoPath to a YAML spec file to run
headersNoHTTP headers (for future use — headers typically come from the spec itself)
timeoutMsNoTimeout in milliseconds (default: 30000)

Implementation Reference

  • The `runSpec` function executes the logic for the "run_spec" tool. It takes `RunSpecInput` (spec text or path), runs the CLI command, parses the JSON output, and returns the result with a formatted summary.
    export async function runSpec(input: RunSpecInput): Promise<RunSpecOutput> {
      if (!input.specText && !input.specPath) {
        throw new Error(
          "Either specText or specPath must be provided to run a spec.",
        );
      }
    
      let report: RunReport;
    
      if (input.specText) {
        report = await withTempFile(input.specText, async (tmpPath) => {
          const args = ["run", tmpPath, "--json"];
          if (input.timeoutMs !== undefined) {
            args.push("--timeout", String(input.timeoutMs));
          }
          const result = await runCli(args, { timeoutMs: input.timeoutMs });
          return JSON.parse(result.stdout) as RunReport;
        });
      } else {
        const args = ["run", input.specPath!, "--json"];
        if (input.timeoutMs !== undefined) {
          args.push("--timeout", String(input.timeoutMs));
        }
        const result = await runCli(args, { timeoutMs: input.timeoutMs });
        report = JSON.parse(result.stdout) as RunReport;
      }
    
      const text = formatReport(report);
      return { text, structured: report };
    }
  • The MCP tool definition for "run_spec" including its input schema and description.
    {
      name: "run_spec",
      description:
        "Run a YAML test spec against an MCP server and return results. Provide either specText (inline YAML) or specPath (path to a file). At least one is required.",
      inputSchema: {
        type: "object" as const,
        properties: {
          specText: {
            type: "string",
            description: "Inline YAML spec content to run",
          },
          specPath: {
            type: "string",
            description: "Path to a YAML spec file to run",
          },
          headers: {
            type: "object",
            additionalProperties: { type: "string" },
            description:
              "HTTP headers (for future use — headers typically come from the spec itself)",
          },
          timeoutMs: {
            type: "number",
            description: "Timeout in milliseconds (default: 30000)",
          },
        },
      },
    },
  • src/server.ts:237-243 (registration)
    The request handler in `server.ts` that dispatches the "run_spec" tool request to the `runSpec` implementation.
    case "run_spec": {
      const output = await runSpec(
        args as unknown as Parameters<typeof runSpec>[0],
      );
      return {
        content: [{ type: "text" as const, text: output.text }],
      };
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly describes the core functionality (running tests and returning results) and mentions the mutual exclusivity requirement for specText/specPath. However, it doesn't disclose important behavioral aspects like error handling, what format the results take, whether this is a read-only or mutating operation, or any performance characteristics like rate limits.

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 extremely efficient - just two sentences that convey the core purpose, parameter requirements, and key constraints. Every word earns its place with no redundancy or unnecessary elaboration. The most important information (what the tool does and the specText/specPath requirement) is front-loaded.

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 tool with 4 parameters, no annotations, and no output schema, the description provides adequate but minimal coverage. It explains the core functionality and parameter requirements well, but leaves significant gaps about what results look like, error conditions, and operational constraints. Given the complexity of running test specs against servers, more context about expected outputs and failure modes would be helpful.

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%, so the schema already documents all parameters thoroughly. The description adds some value by clarifying that 'at least one is required' for specText/specPath and that headers are 'for future use,' but doesn't provide significant additional semantic context beyond what's in the schema descriptions. This meets the baseline for high schema 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?

The description clearly states the action ('Run a YAML test spec'), the target ('against an MCP server'), and the outcome ('return results'). It distinguishes from siblings like 'explain_failure' (analyzing failures), 'generate_spec' (creating specs), and 'inspect_server' (examining server state) by focusing on execution of existing test specs.

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 clear context for when to use this tool: when you have a YAML test spec to execute against an MCP server. It specifies that at least one of specText or specPath is required, which helps guide parameter selection. However, it doesn't explicitly state when NOT to use it or mention alternatives like using 'generate_spec' first to create a spec.

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/raeseoklee/mcp-workbench-mcp-server'

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