Skip to main content
Glama
xiaolai
by xiaolai

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 },

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