BibTeX — 18 Operations for AI Agents

BibTeX databases anchor academic writing — citations, references, the scholarly record behind every paper. act101 treats each entry as an addressable record, so agents find, check, and cross-reference sources without scrolling the bibliography.

This page is the canonical reference an AI coding agent uses to refactor, query, and analyze BibTeX code through the act MCP server. 18 operations available: 0 refactor, 18 query, 0 analysis. Each operation is callable from Claude Code, Cursor, Codex, OpenCode, or any MCP-compatible agent host. Click any operation for a stable anchor link suitable for citation.

18Query

Worked BibTeX examples

act101 reads a BibTeX bibliography's entries — @article, @inproceedings, @book, and the rest — as its declarations: each entry surfaces in the skeleton as a class, named for its citation key rather than its entry type. symbols descends into each entry's fields, reporting the citation key alongside every field it sets, such as author, title, or year, each as its own field. The unit of structure in this grammar is the entry: act101 does not distinguish an @article's journal field from a @book's publisher field, both surface the same way. Each example below is the verbatim output of the command shown, run against the file shown. Query outputs are pretty-printed with the timing block omitted.

Read a bibliography's entries by citation key

wildfire.bib is a three-entry bibliography on wildfire prediction: an @article, an @inproceedings, and a @book, keyed yang2024wildfire, martinez2023fuelmoisture, and lindqvist2020fire.

$ act query skeleton wildfire.bib

Before

@article{yang2024wildfire,
  author = {Yang, Priya and Okonkwo, Chidi},
  title = {Ensemble Learning for Short-Horizon Wildfire Spread Prediction},
  journal = {Journal of Environmental Informatics},
  year = {2024},
  volume = {41},
  pages = {112--130}
}

@inproceedings{martinez2023fuelmoisture,
  author = {Martinez, Elena},
  title = {Fuel Moisture Estimation from Satellite Reflectance},
  booktitle = {Proceedings of the IGARSS Remote Sensing Symposium},
  year = {2023},
  pages = {884--891}
}

@book{lindqvist2020fire,
  author = {Lindqvist, Sven},
  title = {Fire Behavior Modeling in Boreal Forests},
  publisher = {Nordic Forestry Press},
  year = {2020}
}

Output

{
    "type": "Skeleton",
    "declarations": [
        {
            "kind": "class",
            "name": "yang2024wildfire",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 1,
                    "column": 1,
                    "byte_offset": 0
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 8,
                    "column": 2,
                    "byte_offset": 256
                }
            },
            "name_range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 1,
                    "column": 10,
                    "byte_offset": 9
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 1,
                    "column": 26,
                    "byte_offset": 25
                }
            }
        },
        {
            "kind": "class",
            "name": "martinez2023fuelmoisture",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 10,
                    "column": 1,
                    "byte_offset": 258
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 16,
                    "column": 2,
                    "byte_offset": 501
                }
            },
            "name_range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 10,
                    "column": 16,
                    "byte_offset": 273
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 10,
                    "column": 40,
                    "byte_offset": 297
                }
            }
        },
        {
            "kind": "class",
            "name": "lindqvist2020fire",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 18,
                    "column": 1,
                    "byte_offset": 503
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 23,
                    "column": 2,
                    "byte_offset": 668
                }
            },
            "name_range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 18,
                    "column": 7,
                    "byte_offset": 509
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 18,
                    "column": 24,
                    "byte_offset": 526
                }
            }
        }
    ]
}

The skeleton reports all three entries as class declarations named for their citation keys; the fields each entry sets, such as journal or publisher, don't appear at this level.

List every field inside each bibliography entry

The @article entry sets author, title, journal, year, volume, and pages; the @inproceedings and @book entries each set a different subset of those same field names.

$ act query symbols wildfire.bib

Before

@article{yang2024wildfire,
  author = {Yang, Priya and Okonkwo, Chidi},
  title = {Ensemble Learning for Short-Horizon Wildfire Spread Prediction},
  journal = {Journal of Environmental Informatics},
  year = {2024},
  volume = {41},
  pages = {112--130}
}

@inproceedings{martinez2023fuelmoisture,
  author = {Martinez, Elena},
  title = {Fuel Moisture Estimation from Satellite Reflectance},
  booktitle = {Proceedings of the IGARSS Remote Sensing Symposium},
  year = {2023},
  pages = {884--891}
}

@book{lindqvist2020fire,
  author = {Lindqvist, Sven},
  title = {Fire Behavior Modeling in Boreal Forests},
  publisher = {Nordic Forestry Press},
  year = {2020}
}

Output

{
    "type": "Symbols",
    "symbols": [
        {
            "name": "yang2024wildfire",
            "kind": "class",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 1,
                    "column": 10,
                    "byte_offset": 9
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 1,
                    "column": 26,
                    "byte_offset": 25
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "author",
            "kind": "field",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 2,
                    "column": 3,
                    "byte_offset": 29
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 2,
                    "column": 9,
                    "byte_offset": 35
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "title",
            "kind": "field",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 3,
                    "column": 3,
                    "byte_offset": 74
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 3,
                    "column": 8,
                    "byte_offset": 79
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "journal",
            "kind": "field",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 4,
                    "column": 3,
                    "byte_offset": 150
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 4,
                    "column": 10,
                    "byte_offset": 157
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "year",
            "kind": "field",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 5,
                    "column": 3,
                    "byte_offset": 202
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 5,
                    "column": 7,
                    "byte_offset": 206
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "volume",
            "kind": "field",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 6,
                    "column": 3,
                    "byte_offset": 219
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 6,
                    "column": 9,
                    "byte_offset": 225
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "pages",
            "kind": "field",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 7,
                    "column": 3,
                    "byte_offset": 236
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 7,
                    "column": 8,
                    "byte_offset": 241
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "martinez2023fuelmoisture",
            "kind": "class",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 10,
                    "column": 16,
                    "byte_offset": 273
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 10,
                    "column": 40,
                    "byte_offset": 297
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "author",
            "kind": "field",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 11,
                    "column": 3,
                    "byte_offset": 301
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 11,
                    "column": 9,
                    "byte_offset": 307
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "title",
            "kind": "field",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 12,
                    "column": 3,
                    "byte_offset": 331
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 12,
                    "column": 8,
                    "byte_offset": 336
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "booktitle",
            "kind": "field",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 13,
                    "column": 3,
                    "byte_offset": 396
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 13,
                    "column": 12,
                    "byte_offset": 405
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "year",
            "kind": "field",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 14,
                    "column": 3,
                    "byte_offset": 464
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 14,
                    "column": 7,
                    "byte_offset": 468
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "pages",
            "kind": "field",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 15,
                    "column": 3,
                    "byte_offset": 481
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 15,
                    "column": 8,
                    "byte_offset": 486
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "lindqvist2020fire",
            "kind": "class",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 18,
                    "column": 7,
                    "byte_offset": 509
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 18,
                    "column": 24,
                    "byte_offset": 526
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "author",
            "kind": "field",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 19,
                    "column": 3,
                    "byte_offset": 530
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 19,
                    "column": 9,
                    "byte_offset": 536
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "title",
            "kind": "field",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 20,
                    "column": 3,
                    "byte_offset": 560
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 20,
                    "column": 8,
                    "byte_offset": 565
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "publisher",
            "kind": "field",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 21,
                    "column": 3,
                    "byte_offset": 614
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 21,
                    "column": 12,
                    "byte_offset": 623
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "year",
            "kind": "field",
            "range": {
                "start": {
                    "file": "wildfire.bib",
                    "line": 22,
                    "column": 3,
                    "byte_offset": 653
                },
                "end": {
                    "file": "wildfire.bib",
                    "line": 22,
                    "column": 7,
                    "byte_offset": 657
                }
            },
            "visibility": "unknown"
        }
    ]
}

symbols lists the three citation keys again, this time interleaved with the field entries each one sets — journal and volume only appear under yang2024wildfire, publisher only under lindqvist2020fire.

Query

18 query tools, the same on every supported language. Descriptions live in the shared reference: /docs/query-tools.

callers control_flow data_flow definition diagnostics effect_closure effect_summary fix_auto get_type graph import_organize interface mutations references repo_outline skeleton symbols symbols_batch

← BeancountBicep →