Skip to main content
Glama

suggest_cross_references

Analyzes manuscript sections to identify where cross-references should be added, helping writers connect related content and improve document navigation.

Instructions

Suggest where to add links between sections

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathNoPath to manuscript directory (defaults to current directory)
min_similarityNoMinimum similarity threshold
exclude_existing_linksNoExclude existing links

Implementation Reference

  • The handler function that implements the core logic of suggest_cross_references by finding similar content via findDuplicates and generating cross-reference suggestions.
    private async suggestCrossReferences(args: Record<string, unknown>) {
      const minSimilarity = (args.min_similarity as number) || 0.7;
      const limit = resolvePaginationLimit("suggest_cross_references", args.limit as number | undefined);
    
      // Find similar content that could be cross-referenced
      const duplicates = await this.writersAid.findDuplicates({
        similarityThreshold: minSimilarity,
        limit,
      });
    
      return {
        suggestions: duplicates.map((d) => ({
          from: d.file1,
          to: d.file2,
          reason: `Similar content (${Math.round(d.similarity * 100)}% match)`,
        })),
      };
    }
  • The JSON schema defining the input parameters for the suggest_cross_references tool.
    {
      name: "suggest_cross_references",
      description: "Suggest where to add links between sections",
      inputSchema: {
        type: "object",
        properties: {
          project_path: { type: "string", description: "Path to manuscript directory (defaults to current directory)" },
          min_similarity: {
            type: "number",
            description: "Minimum similarity threshold",
            default: 0.7,
          },
          exclude_existing_links: {
            type: "boolean",
            description: "Exclude existing links",
            default: true,
          },
        },
      },
    },
  • The switch case that registers and routes calls to the suggest_cross_references handler in the main tool dispatcher.
    case "suggest_cross_references":
      return this.suggestCrossReferences(args);
  • Pagination configuration for suggest_cross_references tool used by resolvePaginationLimit to enforce limits and defaults.
    export const PAGINATION_DEFAULTS: Record<string, { default: number; max: number }> = {
      find_gaps: { default: 20, max: 100 },
      find_todos: { default: 50, max: 200 },
      find_duplicates: { default: 30, max: 100 },
      check_terminology: { default: 20, max: 50 },
      find_broken_links: { default: 50, max: 200 },
      track_concept_evolution: { default: 10, max: 50 },
      suggest_cross_references: { default: 25, max: 100 },
      analyze_link_graph: { default: 100, max: 500 },
    };
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 mentions 'suggest' but doesn't clarify if this is a read-only analysis, whether it modifies data, what permissions are needed, or how results are returned. This is inadequate for a tool with parameters and no structured safety hints.

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, clear sentence that directly states the tool's purpose without any fluff or redundancy. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 complexity of suggesting cross-references and the lack of annotations and output schema, the description is insufficient. It doesn't explain what the tool returns, how suggestions are prioritized, or any behavioral traits, leaving significant gaps for the agent to operate effectively.

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 input schema fully documents the three parameters (project_path, min_similarity, exclude_existing_links). The description adds no additional meaning beyond what the schema provides, such as explaining how similarity is calculated or what 'links' refer to, but this is acceptable given the high schema coverage, resulting in a baseline score.

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 as suggesting where to add links between sections, which is a specific action (suggest) on a resource (links between sections). However, it doesn't explicitly differentiate from sibling tools like 'find_related_sections' or 'analyze_link_graph', which might have overlapping functionality, so it doesn't reach the highest 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 many sibling tools related to links and sections (e.g., 'find_related_sections', 'analyze_link_graph', 'find_broken_links'), there is no indication of context, prerequisites, or exclusions, leaving the agent to guess based on the name 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/xiaolai/claude-writers-aid-mcp'

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