Skip to main content
Glama

Format a citation

format_citation
Read-only

Format journal articles, books, websites, and other sources into APA 7, MLA 9, Chicago, Harvard, IEEE, BibTeX, or RIS citations from supplied details.

Instructions

Format a journal article, book, website, book chapter, thesis, report, dataset or preprint as a citation in APA 7, MLA 9, Chicago author date, Harvard, IEEE, BibTeX or RIS, from details you provide. Inputs: type (journal, book, website, chapter, thesis, report, dataset or preprint), title, and optional authors (family plus given names), year, container, publisher, city, edition, editors, translators, volume, issue, pages, doi, url, date_text, accessed, institution, degree, repository, report_number and style (apa7, mla9, chicago-ad, harvard, ieee, bibtex, ris or all). Pass all to get all three styles in one reply, each one with its style name on the line above it. Pass bibtex to get one .bib entry for a reference manager. Pass ris to get one RIS record that Zotero, EndNote and Mendeley import. Editors and translators are for books and take the same shape as authors: a book with editors and no authors puts the editors where the author goes, and a book with authors too carries the other names after the title, in the spot each style uses. Example prompt: "Cite this journal article in APA 7: Learning to learn by John Kenneth Smith and Alice Jones, 2020, Journal of Study Skills, volume 4, issue 2, pages 11-25."

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": {
      "type": "<type>",
      "title": "<title>"
    },
    "name": "format_citation"
  }
}

Input Schema

NameRequiredDescriptionDefault
doiNo
urlNo
cityNoPublisher city, used by Chicago for books.
typeYes
yearNo
issueNo
pagesNoFor example "11-25".
styleNoCitation style. Aliases such as APA, MLA 9 and Chicago are accepted. Valid styles: apa7, mla9, chicago-ad (Chicago author date), harvard, ieee, bibtex and ris (a .ris record for Zotero, EndNote and Mendeley), or all to get APA 7, MLA 9 and Chicago author date in one reply with a label above each one.apa7
titleYes
degreeNoThe degree of a thesis, like "Ph.D.".
volumeNo
authorsNo
editionNoFor example "2nd".
editorsNoEditors of a book or a chapter, same shape as authors. When a book has editors and no authors, they take the author's place in the citation.
accessedNoMLA access date, like "14 Oct. 2026".
containerNoJournal name, the book title for a chapter, or website name. Required for a journal article and for a chapter, since without it the citation would be missing the work it appears in.
date_textNoWebsite date as you want it shown, like "2026, October 14" for APA or "14 Oct. 2026" for MLA.
publisherNo
repositoryNoWhere a preprint was posted, like arXiv.
institutionNoThe university or organisation behind a thesis, a report or a dataset.
translatorsNoTranslators of a book, same shape as authors.
report_numberNoThe number of a report or a standard.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.8
    • changedInput schema / properties / style / description
      Previous value: -"Citation style. Aliases such as APA, MLA 9 and Chicago are accepted. Valid styles: apa7, mla9, chicago-ad (Chicago author date), harvard, ieee and bibtex, or all to get APA 7, MLA 9 and Chicago author date in one reply with a label above each one."New value: +"Citation style. Aliases such as APA, MLA 9 and Chicago are accepted. Valid styles: apa7, mla9, chicago-ad (Chicago author date), harvard, ieee, bibtex and ris (a .ris record for Zotero, EndNote and Mendeley), or all to get APA 7, MLA 9 and Chicago author date in one reply with a label above each one."
  2. Changed1 schema field changedv0.1.7
    • changedInput schema / properties / style / description
      Previous value: -"Citation style. Aliases such as APA, MLA 9 and Chicago are accepted. Valid styles: apa7, mla9, chicago-ad (Chicago author date), harvard and ieee, or all to get APA 7, MLA 9 and Chicago author date in one reply with a label above each one."New value: +"Citation style. Aliases such as APA, MLA 9 and Chicago are accepted. Valid styles: apa7, mla9, chicago-ad (Chicago author date), harvard, ieee and bibtex, or all to get APA 7, MLA 9 and Chicago author date in one reply with a label above each one."
  3. Changed2 schema fields changedv0.1.6
    • changedInput schema / properties / container / description
      Previous value: -"Journal name, the book title for a chapter, or website name."New value: +"Journal name, the book title for a chapter, or website name. Required for a journal article and for a chapter, since without it the citation would be missing the work it appears in."
    • changedInput schema / properties / style / description
      Previous value: -"Citation style. Aliases such as APA, MLA 9 and Chicago are accepted. Valid styles: apa7, mla9, chicago-ad (Chicago author date)."New value: +"Citation style. Aliases such as APA, MLA 9 and Chicago are accepted. Valid styles: apa7, mla9, chicago-ad (Chicago author date), harvard and ieee, or all to get APA 7, MLA 9 and Chicago author date in one reply with a label above each one."
  4. First observedv0.1.3

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and openWorldHint=true, so the description's job is to add output behavior — and it does: multi-style replies are labelled with the style name on the line above, BibTeX yields a single .bib entry, RIS yields an importable record. It does not discuss error behavior for missing fields (e.g. a journal with no container), which limits it to a 4.

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

Conciseness3/5

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

The content is front-loaded and ends with a useful example, but the source types and styles are enumerated twice (first sentence, then again in the 'Inputs:' list), and the style list appears a third time in the 'Pass all/bibtex/ris' sentences. That repetition inflates a description that could be materially shorter without losing anything.

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

Completeness4/5

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

For a 22-parameter, no-output-schema tool, the description covers the input contract, the meaning of the style selector, and the shape of the response for each output mode, which is what an agent most needs. The residual gaps are conditional-requirement details (which fields each source type demands) that are spread partially in the schema rather than summarized here.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 59% schema description coverage and 22 parameters, the description carries real weight: it explains editor/translator placement rules (editors substitute for authors; co-existing names follow the title per style) and clarifies the container concept beyond the schema. It still only lists several parameters (doi, url, year, volume, issue, pages) by name without explaining their per-style behavior.

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?

The first sentence names a specific verb (Format) and resource (citation) and enumerates supported source types and styles, so the agent knows exactly what comes out. It is clearly distinguishable from sibling tools like cite_from_doi or cite_from_url, which take an identifier rather than supplied details.

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?

The description gives concrete invocation guidance: pass "all" for the three main styles, "bibtex" for a .bib entry, "ris" for a Zotero/EndNote/Mendeley record, and it supplies a worked example prompt. It never explicitly says when to prefer this over cite_from_doi/cite_from_isbn, so the alternative-routing guidance is implicit rather than stated.

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