Skip to main content
Glama
BibTeX Reference Manager MCP

BibTeX Reference Manager MCP

Find duplicate entries

dedupe_entries
Read-only

Find duplicate BibTeX, RIS, or CSL JSON references by DOI, cite key, or similar titles; identify which entry to keep or remove and return cleaned BibTeX without changing your files.

Instructions

Find duplicate references by matching DOI, by the same cite key, and by similar titles (the years must not clash). Each group says which entry to keep, the one with the most fields, and which to remove. Also returns the list as BibTeX with the extra copies dropped. Example: two entries with the same DOI, one with 3 fields and one with 6, give one group that keeps the entry with 6 fields and lists the other under remove. Your files are not changed.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "dedupe_entries"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe reference list as text: BibTeX, RIS or CSL JSON.
formatNoThe format of the text. Defaults to auto, which looks at the text to decide.
title_thresholdNoHow alike two titles must be to count as the same, from 0.5 to 1. Defaults to 0.9.
merge_duplicatesNoSet to true to also return a merged list that shows, for each group, the fields only the removed copies had, like doi or pages. The kept entry's own fields are never changed. Defaults to false.

Output Schema

NameRequiredDescriptionDefault
totalYesHow many entries were read.
groupsYes
mergedNoOnly present when merge_duplicates is true: one item per group showing the merged fields.
uniqueYesHow many entries are left once the duplicates are dropped.
deduplicated_bibtexYesThe list as BibTeX without the removed copies.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.2
    • addedInput schema / properties / merge_duplicates
      Added value: +{
      +  "description": "Set to true to also return a merged list that shows, for each group, the fields only the removed copies had, like doi or pages. The kept entry's own fields are never changed. Defaults to false.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / merged
      Added value: +{
      +  "description": "Only present when merge_duplicates is true: one item per group showing the merged fields.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "added_fields": {
      +        "additionalProperties": {
      +          "type": "string"
      +        },
      +        "description": "Fields that only the removed copies had, with the value taken from the first copy that has it.",
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "fields": {
      +        "additionalProperties": {
      +          "type": "string"
      +        },
      +        "description": "The kept entry's fields plus the added ones.",
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "key": {
      +        "description": "The cite key of the kept entry.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "key",
      +      "added_fields",
      +      "fields"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description adds matching heuristics, the keep-most-fields rule, BibTeX output with extra copies dropped, and confirmation that files are unchanged. It does not detail the merge_duplicates behavior, but it adds substantial behavioral context beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the purpose and matching rules, then follows with output behavior and a clarifying example. The example earns its place by illustrating the keep/remove grouping, though the description is slightly longer than strictly necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be fully explained in prose, and annotations cover the safety profile. The description still covers matching criteria, keep/remove grouping, BibTeX output, and the no-file-change guarantee, making it complete for this duplicate-finding tool.

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 all four parameters are fully documented in the schema itself. The description adds domain context about duplicate matching but does not explain title_threshold or merge_duplicates semantics beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific action, 'Find duplicate references,' and enumerates the matching criteria: DOI, same cite key, and similar titles with non-clashing years. It also specifies the keep/remove output, making it clearly distinguishable from siblings like fix_entries or lint_entries.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains the duplicate-detection context and reassures that files are not changed, which helps an agent understand when to use it. However, it does not explicitly name alternatives such as lint_entries for style issues or fix_entries for corrections, so there are no explicit exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.