Skip to main content
Glama

check-status

Verify URL accessibility by performing HEAD requests to check if web resources are reachable and responsive.

Instructions

Check if a URL is accessible (HEAD request)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to check
timeoutNoRequest timeout in milliseconds

Implementation Reference

  • The handler function that executes the check-status tool logic: sends a HEAD request to the URL and returns status information, headers, and availability.
    async function handleCheckStatus(args: CheckStatusArgs): Promise<z.infer<typeof CallToolResultSchema>> {
      try {
        const { url, timeout } = args;
        
        console.error(`Checking status of ${url}`);
        
        // Create request options
        const options: any = {
          method: "HEAD",
        };
        
        if (timeout) {
          // @ts-ignore - undici specific options
          options.headersTimeout = timeout;
        }
        
        // Perform the request
        const response = await fetch(url, options);
        
        // Create a result object
        const result = {
          status: response.status,
          statusText: response.statusText,
          headers: Object.fromEntries(response.headers.entries()),
          url: response.url,
          isAvailable: response.ok,
        };
        
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(result, null, 2)
            }
          ]
        };
      } catch (error) {
        console.error(`Error checking URL status:`, error);
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: `Error checking URL status: ${(error as Error).message}`
            }
          ]
        };
      }
    }
    
    // Start the server using stdio transport
  • Zod schema used for input validation in the check-status handler.
    const CheckStatusArgsSchema = z.object({
      url: z.string().url().describe("URL to check"),
      timeout: z.number().positive().optional().describe("Request timeout in milliseconds")
    });
  • src/index.ts:120-131 (registration)
    Tool registration in the TOOLS array, defining name, description, and JSON input schema.
    {
      name: "check-status",
      description: "Check if a URL is accessible (HEAD request)",
      inputSchema: {
        type: "object",
        properties: {
          url: { type: "string", description: "URL to check" },
          timeout: { type: "number", description: "Request timeout in milliseconds" }
        },
        required: ["url"]
      }
    }
  • TypeScript type definition for check-status arguments inferred from the Zod schema.
    type CheckStatusArgs = z.infer<typeof CheckStatusArgsSchema>;
  • src/index.ts:163-164 (registration)
    Dispatch case in the CallToolRequestSchema handler that routes to the check-status handler.
    case "check-status":
      return handleCheckStatus(CheckStatusArgsSchema.parse(args));
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool performs a HEAD request to check URL accessibility, which implies a read-only, non-destructive operation. However, it lacks details on error handling, response formats, rate limits, or authentication needs, which are important for an agent to use it effectively.

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 concise and front-loaded, consisting of a single, clear sentence: 'Check if a URL is accessible (HEAD request)'. Every word earns its place by specifying the action, resource, and method without any unnecessary details or redundancy.

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?

Given the tool's low complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and method but lacks context on when to use it, behavioral traits, or output details. For a simple tool, this might suffice, but it leaves gaps in usage and behavior that could hinder an agent's effectiveness.

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 has 100% description coverage, with clear documentation for 'url' and 'timeout' parameters. The description adds no additional semantic details beyond what the schema provides, such as URL format requirements or timeout implications. With high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.

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 tool's purpose: 'Check if a URL is accessible (HEAD request)'. It specifies the action ('Check'), resource ('URL'), and method ('HEAD request'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'fetch-url' or 'extract-html-fragment', which might also involve URL operations.

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. It doesn't mention sibling tools or contexts where this tool is preferred, such as for quick accessibility checks without downloading content, leaving the agent to infer usage based on the name and description alone.

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/mcollina/mcp-node-fetch'

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