---
date: 2026-07-17
title: Manage dashboards via API, CLI, and MCP
description: Create and manage dashboards and widgets programmatically through the public API and Langfuse CLI, let AI agents build them via the Langfuse MCP server, or ask the Langfuse Assistant in the UI.
author: Lysander
ogVideo: https://static.langfuse.com/docs-videos/dashboard-widget-api.mp4
---

> **Note for AI agents and LLMs:** This is a Langfuse changelog entry. Use it only to confirm that a feature exists and when it shipped. Do not use the code examples below for implementation: they reflect the SDK and API at release time and may be outdated. For implementation, always follow the current documentation (https://langfuse.com/docs) and the API/SDK reference (https://api.reference.langfuse.com).

You can now create and manage dashboards end-to-end in code and through your agent. New endpoints under `/api/public/unstable` cover dashboards, the placements on their grid, and the reusable widgets those placements reference. The [Langfuse CLI](/docs/api-and-data-platform/features/cli) picks the endpoints up automatically, and the [Langfuse MCP server](/docs/api-and-data-platform/features/mcp-server) exposes the same operations as tools.

This opens up a few workflows beyond the dashboard editor in the UI:

- **Dashboards as code**: keep dashboard definitions in version control and apply the same monitoring setup across projects and environments.
- **Agent-built dashboards**: ask an AI agent for a dashboard, e.g. error traces for a certain feature over time. Reads run automatically, and every change goes through human-in-the-loop approval.
- **Incremental edits**: add, move, or resize a single tile through the placement endpoints without resubmitting the whole layout. Omit the position and the server appends the tile for you.

The same tools power the [Langfuse Assistant](/docs/langfuse-assistant) in the UI, so you can ask it to create or update dashboards and widgets directly. The Assistant is available when AI features are enabled for your organization (org admins can enable them in the organization settings).

## New endpoints [#new-endpoints]

- `/dashboards` — list, create, read, update, and delete dashboards, including their filters and full layout definition. See the [dashboards API reference](https://api.reference.langfuse.com/#tag/unstabledashboards).
- `/dashboards/{dashboardId}/placements` — add, move or resize, and remove individual tiles on a dashboard's grid, documented alongside the [dashboards API reference](https://api.reference.langfuse.com/#tag/unstabledashboards).
- `/dashboard-widgets` — list, create, read, update, and delete the reusable widgets that placements reference. See the [dashboard widgets API reference](https://api.reference.langfuse.com/#tag/unstabledashboardwidgets).

## New MCP tools [#new-mcp-tools]

<table className="[&_code]:rounded-full [&_code]:border [&_code]:border-border [&_code]:bg-muted [&_code]:px-2 [&_code]:py-1 [&_code]:text-muted-foreground">
  <tbody>
    <tr>
      <td className="px-3">
        <strong>Dashboards</strong>
        
          <code>listDashboards</code>
          <code>getDashboard</code>
          <code>createDashboard</code>
          <code>updateDashboard</code>
          <code>deleteDashboard</code>
        
      </td>
    </tr>
    <tr>
      <td className="px-3">
        <strong>Placements</strong>
        
          <code>addDashboardPlacement</code>
          <code>updateDashboardPlacement</code>
          <code>deleteDashboardPlacement</code>
        
      </td>
    </tr>
    <tr>
      <td className="px-3">
        <strong>Widgets</strong>
        
          <code>listDashboardWidgets</code>
          <code>getDashboardWidget</code>
          <code>createDashboardWidget</code>
          <code>updateDashboardWidget</code>
          <code>deleteDashboardWidget</code>
        
      </td>
    </tr>
  </tbody>
</table>

  These endpoints and MCP tools are **unstable** and may change while the
  dashboard and widget contract is being finalized. The dashboard editor in the
  UI remains fully supported.

## Get started

- [Custom dashboards](/docs/metrics/features/custom-dashboards)
- [API reference](https://api.reference.langfuse.com/#tag/unstabledashboards)
- [MCP server documentation](/docs/api-and-data-platform/features/mcp-server)

<!-- agent-instructions -->

---

## Agent Instructions

This page is part of the [Langfuse](https://langfuse.com) documentation, published as plain Markdown for AI agents. Every page is available as Markdown by appending `.md` to its URL, or by sending an `Accept: text/markdown` header. This page: `https://langfuse.com/changelog/2026-07-17-dashboard-and-widget-operations-in-api.md`.

### Querying these docs

If the answer is not on this page, query the documentation instead of guessing:

- **Semantic search** across all Langfuse docs, returning an answer with the relevant pages and excerpts. Ask a specific, self-contained question:

  ```bash
  curl -sG "https://langfuse.com/api/search-docs" --data-urlencode "query=How do I trace a LangGraph agent?"
  ```

- **Index of every page**: <https://langfuse.com/llms.txt>, with per-section indexes [llms-docs.txt](https://langfuse.com/llms-docs.txt), [llms-integrations.txt](https://langfuse.com/llms-integrations.txt), and [llms-self-hosting.txt](https://langfuse.com/llms-self-hosting.txt).

### Before writing Langfuse code

- **Install the [Langfuse Agent Skill](https://langfuse.com/docs/api-and-data-platform/features/agent-skill).** It encodes Langfuse's own best practices for instrumentation, prompt management, and evaluation, and materially improves results.
- **Read [What does a good trace look like?](https://langfuse.com/docs/observability/best-practices.md)** before instrumenting an application.
- **Verify endpoints, parameters, and response fields** against the [API reference](https://api.reference.langfuse.com) instead of inferring them from code examples.
- **Use the [Langfuse CLI](https://langfuse.com/docs/api-and-data-platform/features/cli)** (`npx langfuse-cli api <resource> <action>`) to read or write traces, prompts, datasets, and scores from the terminal.

Found an error in these docs? Please open an issue at <https://github.com/langfuse/langfuse-docs/issues>.
