{
  "tools": [
    {
      "name": "add_account",
      "description": "Add a new account to the account tree.",
      "permission": "schema:store"
    },
    {
      "name": "add_entry_fields",
      "description": "Add new lines, conditions, or tags to an entry type. Returns the generated ids.",
      "permission": "schema:store"
    },
    {
      "name": "add_entry_type",
      "description": "Create a new transaction template with optional full configuration. Give entry types that share a purpose a common name prefix (e.g. \"card_authorization\", \"card_settlement\", \"card_refund\") so they group together when the entry list is sorted alphabetically.",
      "permission": "schema:store"
    },
    {
      "name": "add_entry_type_version",
      "description": "Create a new version of an existing entry type. Copies the latest version, optionally overriding fields.",
      "permission": "schema:store"
    },
    {
      "name": "add_event_to_scenario",
      "description": "Add a test transaction to a scenario.",
      "permission": "schema:store"
    },
    {
      "name": "add_payment_entry",
      "description": "Add the default initiated or refund accounting entry. Required settlement and chargeback entries already exist. Returns the generated user-line IDs for editing.",
      "permission": "schema:store"
    },
    {
      "name": "add_payment_fields",
      "description": "Add user lines to one accounting event and/or payment-level tags. Pass event when adding lines. Returns generated IDs and the validated payment type. Payment lines do not support tx matches, repeats, or tags.",
      "permission": "schema:store"
    },
    {
      "name": "add_payment_type",
      "description": "Create a version-1 active card pay-in with the designer defaults and required settlement/chargeback entries. Creates assets/cash/payments and missing parents if no payment account exists. Use returned line IDs to configure user lines; system lines are read-only.",
      "permission": "schema:store"
    },
    {
      "name": "add_root_account",
      "description": "Add a new root-level account. Use for additional roots beyond the default four.",
      "permission": "schema:store"
    },
    {
      "name": "add_scenario",
      "description": "Create a new simulation scenario.",
      "permission": "schema:store"
    },
    {
      "name": "create_project",
      "description": "Create a new Fragment project (schema). By default the project starts with an empty starter chart of accounts. Optionally pass `example` to create a project from one of the examples listed in the `example-schemas` guide, or `schema` to import an existing canonical schema JSON (the deployable .jsonc shape, e.g. from export_schema or a schema file) as a parsed JSON object, not a string. `example` and `schema` are mutually exclusive, and the imported schema's own `key` is replaced by `schemaKey`. Fails if a project with this schemaKey already exists. Returns the schemaKey to pass to other tools.",
      "permission": "schema:store"
    },
    {
      "name": "delete_account",
      "description": "Delete an account and all its children.",
      "permission": "schema:delete"
    },
    {
      "name": "delete_entry_type",
      "description": "Delete a transaction template and all its lines.",
      "permission": "schema:delete"
    },
    {
      "name": "delete_event_from_scenario",
      "description": "Remove one event from a scenario. Payment prerequisites cannot be removed while another event of that payment depends on them.",
      "permission": "schema:delete"
    },
    {
      "name": "delete_payment_type",
      "description": "Delete a payment type and its scenario events from the draft. Compatibility with deployed schemas is checked at deployment.",
      "permission": "schema:delete"
    },
    {
      "name": "delete_scenario",
      "description": "Delete a simulation scenario.",
      "permission": "schema:delete"
    },
    {
      "name": "deploy_project",
      "description": "Deploy the current designer draft for a project to Fragment (stores a new schema version). Distinct from create_project, which seeds an empty project. To create a ledger from the deployed schema, post entries, or generate SDK code, use the Fragment CLI — call get_guide with guideId \"basics\" for its overview and manual link.",
      "permission": "schema:store"
    },
    {
      "name": "export_schema",
      "description": "Return the full canonical schema JSON (the deployable .jsonc shape) for SDK generation, gen-graphql, or external use. Run `fragment gen-graphql` on the output to generate SDK code, or `fragment store-schema` to deploy it — see get_guide with guideId \"basics\" for the CLI overview and manual link. Not for browsing or editing — use get_schema for a compact draft overview with stable IDs. Supports draft (Liveblocks designer) or deployed (DynamoDB) source.",
      "permission": "schema:read"
    },
    {
      "name": "get_account",
      "description": "Get full details of a single account: type, status, currency, consistency config, and linked account.",
      "permission": "schema:read"
    },
    {
      "name": "get_balances_at_step",
      "description": "Get account balances at a specific step in a scenario by simulating posted entry amounts.",
      "permission": "schema:read"
    },
    {
      "name": "get_deploy_history",
      "description": "List deployed schema versions for a project (newest first). OpenSearch-backed; returns version and created timestamp for each deployment.",
      "permission": "schema:read"
    },
    {
      "name": "get_entry_type",
      "description": "Get full details of a single transaction template: lines, accounts, amounts, currencies.",
      "permission": "schema:read"
    },
    {
      "name": "get_guide",
      "description": "Get a guide on Fragment ledger design. Call without arguments to list available guides.",
      "permission": "schema:read"
    },
    {
      "name": "get_ledger_entry",
      "description": "Read a posted ledger entry and all its lines by entry ID, or by ledger (ID or idempotency key) and entry idempotency key. An ID selects that entry version; an idempotency key selects the latest unreversed entry, matching the API. Amounts are exact integer strings, positive for balance increases and negative for decreases. No schemaKey is required.",
      "permission": "ledger:read"
    },
    {
      "name": "get_payment_type",
      "description": "Get a payment type, its accounting entries, stable line/tag IDs, creation parameters, and validation errors. System lines are read-only.",
      "permission": "schema:read"
    },
    {
      "name": "get_scenario",
      "description": "Get simulation scenario data. Without scenarioId, lists all scenarios. With scenarioId, returns the scenario events; use get_balances_at_step for simulated balances.",
      "permission": "schema:read"
    },
    {
      "name": "get_schema",
      "description": "Compact, navigable overview of the designer draft: default settings (currency mode/currency, consistency config), account tree, entry-type IDs, and payment-type IDs for finding stable IDs to edit. Entry types are listed in schema order (alphabetical for projects kept sorted; see sort_entries). Use export_schema for the full deployable/SDK JSON.",
      "permission": "schema:read"
    },
    {
      "name": "get_status",
      "description": "Check if the Fragment MCP server is connected and which workspace/project is active.",
      "permission": "schema:read"
    },
    {
      "name": "list_ledger_entries",
      "description": "List posted ledger entries in one ledger, newest posted first, with the same filters and cursor pagination as the API. Search-index backed: recent writes may take time to appear. Returns summaries; use get_ledger_entry for lines. No schemaKey is required.",
      "permission": "ledger:read"
    },
    {
      "name": "move_account",
      "description": "Move an account (and its subtree) under a different parent. The account ID is preserved, so all entry lines and conditions that reference it follow the move; only the stored account paths are rewritten. The moved account and its whole subtree automatically adopt the new parent's account type (e.g. moving under liabilities recategorizes the subtree as liability); the type cannot be set manually.",
      "permission": "schema:store"
    },
    {
      "name": "remove_entry_fields",
      "description": "Remove lines, conditions, or tags from an entry type by id. Groups can only be removed, never added — new schemas must not use groups.",
      "permission": "schema:delete"
    },
    {
      "name": "remove_payment_entry",
      "description": "Remove an optional initiated or refund accounting entry and its scenario events. Required settlement and chargeback entries cannot be removed.",
      "permission": "schema:delete"
    },
    {
      "name": "remove_payment_fields",
      "description": "Remove user lines from one accounting event and/or payment-level tags by ID. Pass event when removing lines. System lines cannot be removed.",
      "permission": "schema:delete"
    },
    {
      "name": "select_project",
      "description": "List the projects in this workspace with their schemaKeys. Call before editing; confirm the intended schemaKey with the user and reuse it.",
      "permission": "schema:read"
    },
    {
      "name": "set_account_payment",
      "description": "Designate or un-designate the schema payment account in the draft. Requires an eligible active USD asset account; clears its linked-account and clearing flags and repoints payment system lines when enabled. Configure the account with update_account first.",
      "permission": "schema:store"
    },
    {
      "name": "set_event_parameters",
      "description": "Set parameter values on events within a scenario. Each update targets one parameter on one event; pass several to update multiple events at once.",
      "permission": "schema:store"
    },
    {
      "name": "set_schema_defaults",
      "description": "Set chart-of-accounts level defaults. These are inherited by new accounts unless overridden.",
      "permission": "schema:store"
    },
    {
      "name": "sort_entries",
      "description": "Reorder the schema's entry types alphabetically by type name. Entry types that share a naming prefix (e.g. \"card_authorization\", \"card_settlement\") group together in the list. Projects created from scratch stay sorted as entries are added; call this to (re)sort a project whose entries are in a custom order.",
      "permission": "schema:store"
    },
    {
      "name": "update_account",
      "description": "Update properties on an existing account. Provide only fields to change.",
      "permission": "schema:store"
    },
    {
      "name": "update_entry_type",
      "description": "Modify existing fields on an entry type. Pass the id of each line, condition, or tag to change; only provided properties are updated. Use add_entry_fields to create and remove_entry_fields to delete. By default the latest version is edited; pass entryTypeVersionId to target a specific version — the only edit allowed on an already-deployed version is a status change.",
      "permission": "schema:store"
    },
    {
      "name": "update_payment_type",
      "description": "Update only supplied payment fields, existing tags by ID, or one accounting entry and its user lines by ID. Use add/remove_payment_fields for field creation/deletion. Edits affect the draft; compatibility with deployed schemas is checked at deployment.",
      "permission": "schema:store"
    },
    {
      "name": "update_scenario",
      "description": "Update properties on an existing scenario.",
      "permission": "schema:store"
    },
    {
      "name": "verify_schema",
      "description": "Validate the schema against Fragment's rules. Returns errors (empty if valid).",
      "permission": "schema:read"
    }
  ]
}
