# edit_dashboard_source Apply atomic exact-text replacements to one canonical dashboard YAML revision. Each oldText must match exactly once; invalid, ambiguous, overlapping, or stale edits leave the draft unchanged. Machine-readable: [focused JSON](/docs/agent-tools/tools/edit_dashboard_source.json) ยท [complete manifest](/docs/agent-tools/manifest.json) ## Contract | Property | Value | | --- | --- | | Authorization | `RESOURCE_EDIT` | | Effect | `write` | | Operation | `manual` | | Tags | `dashboard`, `authoring`, `source` | | Defaults | `{}` | | MCP annotations | read/write, not idempotent, non-destructive, closed-world | ## Input schema ```json { "additionalProperties": false, "properties": { "dashboardId": { "minLength": 1, "type": "string" }, "draftId": { "minLength": 1, "type": "string" }, "edits": { "items": { "additionalProperties": false, "properties": { "newText": { "type": "string" }, "oldText": { "minLength": 1, "type": "string" } }, "required": [ "newText", "oldText" ], "type": "object" }, "type": "array" }, "expectedRevision": { "additionalProperties": false, "properties": { "contentHash": { "type": "string" }, "number": { "type": "integer" }, "revisionId": { "type": "string" } }, "required": [ "contentHash", "number", "revisionId" ], "type": "object" } }, "required": [ "dashboardId", "draftId", "edits", "expectedRevision" ], "type": "object" } ``` ## Output schema ```json { "additionalProperties": false, "properties": { "changedBlocks": { "type": "integer" }, "diff": { "type": "string" }, "lifecycle": { "additionalProperties": {}, "type": "object" }, "revision": { "additionalProperties": {}, "type": "object" }, "yaml": { "type": "string" } }, "required": [ "changedBlocks", "diff", "lifecycle", "revision", "yaml" ], "type": "object" } ```