Skip to main content
Glama

clear_endpoints

Remove configured endpoints from SpyNet's session-based mock servers to manage REST and WebSocket testing environments.

Instructions

Clear configured endpoints (all or specific)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession identifier
methodNoOptional: HTTP method to clear
pathNoOptional: endpoint path to clear

Implementation Reference

  • The implementation of the clear_endpoints tool handler.
    clear_endpoints: async (args: any) => {
      try {
        const { sessionId, method, path } = args;
    
        if (!sessionId) {
          return {
            success: false,
            error: 'Missing required field: sessionId'
          };
        }
    
        const session = sessionManager.getOrCreate(sessionId);
    
        if (method && path) {
          const key = `${method.toUpperCase()}:${path}`;
          session.endpoints.delete(key);
        } else {
          session.endpoints.clear();
        }
    
        return { success: true };
      } catch (error: any) {
        return {
          success: false,
          error: `Failed to clear endpoints: ${error.message}`
        };
      }
  • The registration of the clear_endpoints tool in the MCP server.
    name: 'clear_endpoints',
    description: 'Clear configured endpoints (all or specific)',
    inputSchema: {
      type: 'object',
      properties: {
        sessionId: {
          type: 'string',
          description: 'Session identifier',
        },
        method: {
          type: 'string',
          description: 'Optional: HTTP method to clear',
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It fails to clarify what 'clearing' entails (permanent deletion vs temporary disablement), whether the operation is reversible, or what happens to active connections/requests targeting those endpoints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely brief (5 words). While not verbose, it is so terse that it under-delivers on necessary context. The parenthetical is compressed to the point of opacity. Every word earns its place, but more words are needed.

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?

For a destructive state-modification tool with no output schema, the description is inadequate. It omits return value semantics, error conditions (e.g., clearing non-existent endpoints), side effects on the session, and relationship to the 'configure_endpoint' sibling.

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%, establishing a baseline of 3. The description conceptually links the optional method/path parameters to 'specific' clearing versus 'all', but adds no syntax details, format examples, or clarification that omitting optional parameters clears all endpoints for the session.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the action ('Clear') and resource ('configured endpoints'), but 'clear' is ambiguous (delete? unregister? reset?). The parenthetical '(all or specific)' hints at filtering behavior but does not distinguish this from sibling 'delete_session' (which removes the entire session vs just endpoints).

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?

No guidance provided on when to use this tool versus alternatives like 'delete_session' or when clearing is preferred over re-configuring. No mention of prerequisites (e.g., that endpoints must be configured first).

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/aj-bartocci/SpyNet'

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