Format Citation
formatCitationFormat scholarly identifiers into a finished citation in a specific style. Use when the user wants a paste-ready citation string for a manuscript, slide, message, footnote, or in-line reference. Style defaults to vancouver if unspecified; ask the user before defaulting if any ambiguity exists (e.g. 'Harvard' and 'Chicago' have multiple variants — confirm which one). Supports five hand-tuned builtins (vancouver, ama, apa, ieee, cse) plus any of 10,000+ CSL style IDs (chicago-author-date, harvard-cite-them-right, modern-language-association, nature, bmj, the-lancet, etc.). Alias and dependent-style resolution apply, so 'harvard' resolves to 'harvard-cite-them-right' and the canonical ID is reported back as styleUsed. Output defaults to text; pass output=html for marked-up HTML or output=json for structured CSL items. Accepts the same identifier formats as resolveIdentifier (DOI/PMID/PMCID/ISBN/arXiv/ISSN/ADS/WHO IRIS, prefixes tolerated), single or comma/newline-separated batch — one round trip per call. Returns: one of { text, html, items } depending on the output parameter, followed by a metadata block ({formatter: 'builtin' | 'csl', styleUsed, requestId, warnings?}) appended as a second text content item — surface this to the user when they care about reproducibility. Use resolveIdentifier instead when the user wants raw metadata to inspect or transform; use exportCitation when they want a downloadable bibliography file. Read-only and idempotent — safe to retry. Works anonymously against the public Scholar Sidekick API (rate-limited free tier); set SCHOLAR_API_KEY (a free ssk_ key from https://scholar-sidekick.com/account) for higher limits, or RAPIDAPI_KEY for paid RapidAPI tiers. Rate limits follow your tier.
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": "formatCitation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Locale for formatting (e.g. en-US, en-GB, fr-FR) | |
| text | Yes | One or more identifiers (DOIs, PMIDs, ISBNs, arXiv IDs, etc.) separated by newlines or commas | |
| style | No | Citation style: vancouver (default), ama, apa, ieee, cse, or any CSL style ID | |
| output | No | Output format (default: text) | |
| footnote | No | Format as footnotes instead of bibliography entries |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | No | Formatted citation HTML (when output=html). | |
| lang | No | Locale used for formatting. | |
| text | No | Formatted citation text (when output=text). | |
| items | No | Structured CSL items (when output=json). | |
| warnings | No | ||
| formatter | No | Which engine formatted: 'builtin' or 'csl'. | |
| styleUsed | No | Canonical style ID after alias/dependent-style resolution. |