TOML — 18 Operations for AI Agents

TOML is the manifest format of modern toolchains — `Cargo.toml`, `pyproject.toml`, configuration that defines how projects build and ship. act101 reads tables and keys as structure, so agents locate and reason about project metadata without scanning the file.

This page is the canonical reference an AI coding agent uses to refactor, query, and analyze TOML 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 TOML examples

act101 reads a TOML file's table headers — [table] and [[array-of-tables]], including dotted headers like [dependencies.clap] — as its top-level declarations: the skeleton tags each one module, and symbols tags the same set class. Neither query descends into the key-value pairs a table body holds; a pair only surfaces on its own when it sits directly in the document, before any table header. The unit of structure in this grammar is the table header: a manifest built entirely out of [section] blocks, like a package manifest, reports one declaration per section and nothing for the fields inside each one. 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 the table headers as a skeleton

manifest.toml is a package manifest with five table headers: [package], [dependencies], [dependencies.clap], [[bin]], and [profile.release].

$ act query skeleton manifest.toml

Before

[package]
name = "act-cli"
version = "2.2.3"
edition = "2021"

[dependencies]
serde = { version = "1", features = ["derive"] }
tokio = { version = "1", features = ["full"] }

[dependencies.clap]
version = "4"
features = ["derive"]

[[bin]]
name = "act"
path = "src/main.rs"

[profile.release]
lto = true

Output

{
    "type": "Skeleton",
    "declarations": [
        {
            "kind": "module",
            "name": "package",
            "range": {
                "start": {
                    "file": "manifest.toml",
                    "line": 1,
                    "column": 1,
                    "byte_offset": 0
                },
                "end": {
                    "file": "manifest.toml",
                    "line": 6,
                    "column": 1,
                    "byte_offset": 63
                }
            },
            "name_range": {
                "start": {
                    "file": "manifest.toml",
                    "line": 1,
                    "column": 2,
                    "byte_offset": 1
                },
                "end": {
                    "file": "manifest.toml",
                    "line": 1,
                    "column": 9,
                    "byte_offset": 8
                }
            }
        },
        {
            "kind": "module",
            "name": "dependencies",
            "range": {
                "start": {
                    "file": "manifest.toml",
                    "line": 6,
                    "column": 1,
                    "byte_offset": 63
                },
                "end": {
                    "file": "manifest.toml",
                    "line": 10,
                    "column": 1,
                    "byte_offset": 175
                }
            },
            "name_range": {
                "start": {
                    "file": "manifest.toml",
                    "line": 6,
                    "column": 2,
                    "byte_offset": 64
                },
                "end": {
                    "file": "manifest.toml",
                    "line": 6,
                    "column": 14,
                    "byte_offset": 76
                }
            }
        },
        {
            "kind": "module",
            "name": "dependencies.clap",
            "range": {
                "start": {
                    "file": "manifest.toml",
                    "line": 10,
                    "column": 1,
                    "byte_offset": 175
                },
                "end": {
                    "file": "manifest.toml",
                    "line": 14,
                    "column": 1,
                    "byte_offset": 232
                }
            },
            "name_range": {
                "start": {
                    "file": "manifest.toml",
                    "line": 10,
                    "column": 2,
                    "byte_offset": 176
                },
                "end": {
                    "file": "manifest.toml",
                    "line": 10,
                    "column": 19,
                    "byte_offset": 193
                }
            }
        },
        {
            "kind": "module",
            "name": "bin",
            "range": {
                "start": {
                    "file": "manifest.toml",
                    "line": 14,
                    "column": 1,
                    "byte_offset": 232
                },
                "end": {
                    "file": "manifest.toml",
                    "line": 18,
                    "column": 1,
                    "byte_offset": 275
                }
            },
            "name_range": {
                "start": {
                    "file": "manifest.toml",
                    "line": 14,
                    "column": 3,
                    "byte_offset": 234
                },
                "end": {
                    "file": "manifest.toml",
                    "line": 14,
                    "column": 6,
                    "byte_offset": 237
                }
            }
        },
        {
            "kind": "module",
            "name": "profile.release",
            "range": {
                "start": {
                    "file": "manifest.toml",
                    "line": 18,
                    "column": 1,
                    "byte_offset": 275
                },
                "end": {
                    "file": "manifest.toml",
                    "line": 20,
                    "column": 1,
                    "byte_offset": 304
                }
            },
            "name_range": {
                "start": {
                    "file": "manifest.toml",
                    "line": 18,
                    "column": 2,
                    "byte_offset": 276
                },
                "end": {
                    "file": "manifest.toml",
                    "line": 18,
                    "column": 17,
                    "byte_offset": 291
                }
            }
        }
    ]
}

The skeleton reports all five headers as module declarations, dependencies.clap and profile.release keeping their dotted names; the keys inside each table, such as name, version, and lto, don't appear.

List the same table headers as symbols

[dependencies] sets serde and tokio inline, while [dependencies.clap] sets clap's version and features in its own table body.

$ act query symbols manifest.toml

Before

[package]
name = "act-cli"
version = "2.2.3"
edition = "2021"

[dependencies]
serde = { version = "1", features = ["derive"] }
tokio = { version = "1", features = ["full"] }

[dependencies.clap]
version = "4"
features = ["derive"]

[[bin]]
name = "act"
path = "src/main.rs"

[profile.release]
lto = true

Output

{
    "type": "Symbols",
    "symbols": [
        {
            "name": "package",
            "kind": "class",
            "range": {
                "start": {
                    "file": "manifest.toml",
                    "line": 1,
                    "column": 2,
                    "byte_offset": 1
                },
                "end": {
                    "file": "manifest.toml",
                    "line": 1,
                    "column": 9,
                    "byte_offset": 8
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "dependencies",
            "kind": "class",
            "range": {
                "start": {
                    "file": "manifest.toml",
                    "line": 6,
                    "column": 2,
                    "byte_offset": 64
                },
                "end": {
                    "file": "manifest.toml",
                    "line": 6,
                    "column": 14,
                    "byte_offset": 76
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "dependencies.clap",
            "kind": "class",
            "range": {
                "start": {
                    "file": "manifest.toml",
                    "line": 10,
                    "column": 2,
                    "byte_offset": 176
                },
                "end": {
                    "file": "manifest.toml",
                    "line": 10,
                    "column": 19,
                    "byte_offset": 193
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "bin",
            "kind": "class",
            "range": {
                "start": {
                    "file": "manifest.toml",
                    "line": 14,
                    "column": 3,
                    "byte_offset": 234
                },
                "end": {
                    "file": "manifest.toml",
                    "line": 14,
                    "column": 6,
                    "byte_offset": 237
                }
            },
            "visibility": "unknown"
        },
        {
            "name": "profile.release",
            "kind": "class",
            "range": {
                "start": {
                    "file": "manifest.toml",
                    "line": 18,
                    "column": 2,
                    "byte_offset": 276
                },
                "end": {
                    "file": "manifest.toml",
                    "line": 18,
                    "column": 17,
                    "byte_offset": 291
                }
            },
            "visibility": "unknown"
        }
    ]
}

symbols reports the same five headers as class declarations; serde, tokio, and clap's own version and features keys are nested inside a table body, so none of them are listed.

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

← TLA+TSX →