Skip to main content
Glama

find_broken_links

Detect broken internal and external links in markdown manuscripts to maintain content integrity and improve user experience by identifying and addressing non-functional URLs.

Instructions

Detect broken internal and external links

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathNoPath to manuscript directory (defaults to current directory)
check_externalNoCheck external links
scopeNoFile scope pattern
limitNoMaximum results

Implementation Reference

  • The primary handler function for the 'find_broken_links' MCP tool. It processes input arguments, applies pagination limits, and delegates to the WritersAid.checkLinks method for core logic.
    private async findBrokenLinks(args: Record<string, unknown>) {
      const checkExternal = (args.check_external as boolean) || false;
      const scope = args.scope as string | undefined;
      const limit = resolvePaginationLimit("find_broken_links", args.limit as number | undefined);
    
      return this.writersAid.checkLinks({ checkExternal, scope, limit });
    }
  • The JSON schema definition for the tool, specifying input parameters, types, descriptions, and defaults for MCP validation.
    {
      name: "find_broken_links",
      description: "Detect broken internal and external links",
      inputSchema: {
        type: "object",
        properties: {
          project_path: { type: "string", description: "Path to manuscript directory (defaults to current directory)" },
          check_external: { type: "boolean", description: "Check external links", default: false },
          scope: { type: "string", description: "File scope pattern" },
          limit: { type: "number", description: "Maximum results", default: 50 },
        },
      },
    },
  • The tool registration in the central handleTool switch dispatcher, mapping the tool name to its handler method.
    case "find_broken_links":
      return this.findBrokenLinks(args);
  • Pagination limit configuration used by the handler to enforce safe result limits and prevent token overflow.
    find_broken_links: { default: 50, max: 200 },
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. While 'detect' implies a read-only operation, it doesn't specify whether this is a scan that might be resource-intensive, time-consuming, or have side effects like network requests for external links. The description lacks details on output format, error handling, or performance characteristics.

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 front-loads the core purpose without unnecessary words. Every part of the phrase 'Detect broken internal and external links' contributes directly to understanding the tool's function, making it optimally concise.

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 lack of annotations and output schema, the description is incomplete for a tool with four parameters. It doesn't explain what the tool returns (e.g., a list of broken links, a report format) or provide behavioral context needed for safe and effective use, especially in a server with many similar analysis tools.

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 fully documents all four parameters. The description doesn't add any meaning beyond what's in the schema—it mentions 'internal and external links' which aligns with the 'check_external' parameter but doesn't provide additional context about parameter interactions or usage examples.

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 with a specific verb ('detect') and resource ('broken internal and external links'), making it immediately understandable. However, it doesn't differentiate from sibling tools like 'analyze_link_graph' or 'trace_reference_chain' which might also involve link analysis, leaving room for ambiguity in a crowded toolset.

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 many sibling tools related to content analysis (e.g., 'analyze_link_graph', 'trace_reference_chain'), there's no indication of specific contexts, prerequisites, or exclusions for this link-checking operation.

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/xiaolai/claude-writers-aid-mcp'

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