Skip to main content
Glama

Get Mock Server

get_mock_server
Read-only

Retrieve the active project's mock server status, URL, and settings, including rule counts and Smart Mock details. Returns null when no mock server exists, signaling the need to create one.

Instructions

Get the mock server status and URL for the active project. Returns server details including MockCode, URL, active status, rule count, and Smart Mock settings. Returns null if no mock server exists yet (use create_mock_server to create one). Set includeStats to also get rule, request-log and spec-coverage statistics. The access token is never returned; when requireToken is on, the only way to obtain one is 'regenerate_mock_server_token' (which invalidates the old token). Requires project context (call set_context first).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeStatsNoAlso return rule counts, request-log aggregates and which spec endpoints have no mock rule yet. Defaults to false.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.1.1

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses important behavior: it returns null when no mock server exists, never returns the access token, explains token regeneration invalidates the old token, and requires project context. These details inform the agent of edge cases and side-effect-free behavior without relying on annotations.

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 front-loaded with the main purpose and return value, then progressively adds optional behavior, security caveats, and prerequisites. Every sentence adds distinct useful information with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no output schema, the description compensates by enumerating the returned fields, null behavior, optional stats behavior, token security semantics, and setup requirement. This is enough for an agent to call the tool correctly and interpret common results.

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?

The input schema already documents includeStats with full coverage (100%), including its default and effect. The description restates this information in prose but adds minimal new semantic value, so the baseline of 3 is appropriate.

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 gets the mock server status and URL for the active project, names the returned fields, and differentiates itself from siblings like list_mock_rules or get_mock_usage by focusing on the mock server itself. It also specifies a null return when no server exists, which sharpens the purpose.

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 gives clear context: it requires project context via set_context first, and it directs users to create_mock_server when no server exists. It does not explicitly contrast with all similar mock-related tools, but the scoping to 'active project' and the create path provide strong usage guidance.

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/routebase-dev/routebase-mcp'

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