Skip to main content
Glama

getWhistleStatus

Check the current operational status of the Whistle proxy server. Use this tool to monitor and manage proxy settings, rules, and network requests efficiently.

Instructions

获取whistle服务器的当前状态

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:316-324 (registration)
    Registration of the 'getWhistleStatus' tool with FastMCP server. Includes schema (empty input parameters), description, and the primary handler function that calls WhistleClient.getStatus() and formats the response.
    server.addTool({
      name: "getWhistleStatus",
      description: "获取whistle服务器的当前状态",
      parameters: z.object({}),
      execute: async () => {
        const status = await whistleClient.getStatus();
        return formatResponse(status);
      },
    });
  • Core handler implementation in WhistleClient class. Fetches server status from Whistle's /cgi-bin/init API endpoint, extracts status data (excluding rules and values), and returns it. This is the key logic executed by the tool.
    /**
     * 获取服务器状态
     * @returns Promise with the server status information
     */
    async getStatus(): Promise<any> {
      const timestamp = Date.now();
      const response = await axios.get(`${this.baseUrl}/cgi-bin/init`, {
        params: { _: timestamp },
        headers: {
          Accept: "application/json, text/javascript, */*; q=0.01",
          "Cache-Control": "no-cache",
          Pragma: "no-cache",
          "X-Requested-With": "XMLHttpRequest",
        },
      });
      const { rules, values, ...restData } = response.data;
      return restData;
    }
  • Helper function formatResponse used by the tool handler to standardize the MCP response format as a content array containing the JSON-stringified status data.
    function formatResponse(data: any) {
      return {
        content: [
          {
            type: "text" as const,
            text: JSON.stringify(data),
          },
        ],
      };
    }
  • WhistleClient constructor initializes the baseUrl used in getStatus for API calls to the Whistle server.
    constructor(host: string = "localhost", port: number = 8899) {
      this.baseUrl = `http://${host}:${port}`;
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. While '获取' (get) implies a read operation, the description doesn't disclose any behavioral traits like whether this requires authentication, has rate limits, returns real-time vs cached data, or what format the status information comes in. For a status-checking tool with zero annotation coverage, this is inadequate.

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 a single, efficient sentence that states exactly what the tool does with zero wasted words. It's appropriately sized for a simple tool with no parameters and gets straight to the point.

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

Completeness2/5

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

Given the tool's simplicity (0 parameters, no output schema) and lack of annotations, the description is incomplete. It doesn't explain what 'status' means in this context (e.g., running/stopped, metrics, configuration state) or what format the information returns. For a status tool that could have various interpretations, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the baseline is 4. The description appropriately doesn't waste space discussing nonexistent parameters, though it could theoretically mention that no configuration is needed for this status check.

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?

The description clearly states the action ('获取' meaning 'get') and resource ('whistle服务器的当前状态' meaning 'whistle server's current status'), providing a specific verb+resource combination. However, it doesn't differentiate from siblings like 'getCurrentTimestamp' or 'getInterceptInfo' which also retrieve status-like information, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'getCurrentTimestamp' and 'getInterceptInfo' that might retrieve related status information, there's no indication of when this specific status check is appropriate versus other getter tools.

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

Related 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/7gugu/whistle-mcp'

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