Skip to main content
Glama

Format a citation

format_citation
Read-only

Format a paper’s reference in APA, MLA, Chicago, Harvard, IEEE, or BibTeX from its DOI or OpenAlex ID; missing fields are omitted rather than invented.

Instructions

Returns a ready to paste reference for one paper in APA, MLA, Chicago, Harvard, IEEE or BibTeX, built from the OpenAlex record. Parts the record does not have, such as authors or a venue, are left out instead of invented, so check the result against the paper before you hand it in. A wrong or unknown reference returns a not found error that suggests searching by title or checking the DOI format. Inputs: paper (required, a DOI like 10.1038/nature14539, a doi.org link, or an OpenAlex id like W2741809807), style (required, apa, mla, chicago, harvard, ieee or bibtex). Example prompt: 'give me an APA citation for DOI 10.1038/nature14539.'

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": {
      "paper": "<paper>",
      "style": "<style>"
    },
    "name": "format_citation"
  }
}

Input Schema

NameRequiredDescriptionDefault
paperYesA DOI like 10.1038/nature14539, a doi.org link, or an OpenAlex id like W2741809807.
styleYesThe citation style: apa, mla, chicago, harvard, ieee or bibtex.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.9
    • changedInput schema / properties / style / description
      Previous value: -"The citation style: apa, mla or bibtex."New value: +"The citation style: apa, mla, chicago, harvard, ieee or bibtex."
    • changedInput schema / properties / style / enum
      Previous value: -[
      -  "apa",
      -  "mla",
      -  "bibtex"
      -]New value: +[
      +  "apa",
      +  "mla",
      +  "bibtex",
      +  "chicago",
      +  "harvard",
      +  "ieee"
      +]
  2. Addedv0.1.8

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds genuinely new behavior: missing fields (authors, venue) are omitted rather than fabricated, and the agent is told to verify the result. It also describes the not-found failure mode and the recovery suggestions, which goes well 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-loaded with the return value and the omission caveat, then error behavior, then inputs and an example. Slightly redundant because the 'Inputs:' sentence duplicates the schema verbatim, but overall tight and well ordered.

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?

For a two-parameter read-only tool with no output schema, the description covers what is returned, how incomplete records are handled, what failure looks like, and how to recover. Nothing an agent needs in order to call it correctly is missing.

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 coverage is 100%, so both parameters and the style enum are already fully documented. The description's 'Inputs:' sentence restates the accepted DOI/link/OpenAlex-id forms and the style list without adding format or edge-case meaning, so the baseline of 3 applies.

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 verb and resource ('Returns a ready to paste reference for one paper') and enumerates the six supported styles. The scoping phrase 'for one paper' implicitly separates it from the plural sibling format_citations, so an agent can pick between them without opening a schema.

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?

Usage context is clear from the example prompt ('give me an APA citation for DOI ...') and from the error guidance to search by title or check the DOI format. It does not explicitly state when to prefer format_citations for multiple papers, so the alternative routing is only implied.

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