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

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