alert_create
ChatGPTCreate a new alert that periodically runs a SQL query and sends notifications based on results.
alert_delete
ChatGPTPermanently delete an alert. This stops all future evaluations and notifications.
alert_get
ChatGPTGet an alert's configuration and last run result by ID. Use this to inspect what an alert does (its query, schedule, channels) or check its most recent evaluation.
alert_history
ChatGPTGet the run history of an alert, showing each time it was evaluated and whether it matched.
alert_list
ChatGPTList alert summaries and their latest completed run status. Query text and full result data are omitted to keep the response small. Call alert_get with an alert's id when you need its full configuration. Returns an empty list if no alerts exist; do not retry an empty result.
alert_status
ChatGPTCheck if an alert is currently firing and when it last triggered or resolved. Returns the alert's current firing state plus timestamps for the most recent trigger and resolution events within the lookback period.
alert_update
ChatGPTUpdate an existing alert's configuration. Only provided fields are changed.
channel_create_opsgenie
ChatGPTCreate an Opsgenie notification channel for incident management alerts.
channel_create_webhook
ChatGPTCreate a webhook notification channel for Slack, Discord, or custom HTTP endpoints.
channel_delete
ChatGPTPermanently delete a notification channel. Alerts using this channel will no longer send to it.
channel_get
ChatGPTGet a specific notification channel by ID.
channel_list
ChatGPTList all notification channels in the organization.
channel_update_opsgenie
ChatGPTUpdate an Opsgenie channel's API key, label, or active status. Only provided fields are changed.
channel_update_webhook
ChatGPTUpdate a webhook channel's URL, format, label, or active status. Only provided fields are changed.
dashboard_add_panel
ChatGPTAdd a new panel to an existing dashboard with optional layout position.
dashboard_add_variable
ChatGPTAdd a single variable to a dashboard at an optional position.
dashboard_create
ChatGPTCreate a new dashboard from a Perses JSON definition or as an empty dashboard.
dashboard_create_group
ChatGPTCreate a new layout group in a dashboard. Groups organize panels into collapsible sections.
dashboard_delete
ChatGPTDelete a dashboard by slug. This permanently removes the dashboard and all its panels.
dashboard_delete_group
ChatGPTDelete an empty layout group from a dashboard. Fails if the group still contains panels; remove panels first. The response confirms success; no need to call dashboard_get to verify.
dashboard_get
ChatGPTGet the full dashboard definition as Perses-compatible JSON. Also suitable for exporting or version-controlling dashboards.
dashboard_list
ChatGPTList dashboards in a project with optional search and cursor-based pagination. Returns name, slug, version, and timestamps for each dashboard. Returns an empty list if no dashboards exist; do not retry if the list is empty. Use the search parameter to filter by name.
dashboard_panel_reference
ChatGPTGet the panel guide and the JSON schema of every panel kind's settings. Covers which query each kind takes, how query columns become series and labels, layout rules, and common mistakes. Call once before creating or restyling panels.
dashboard_remove_panel
ChatGPTRemove a panel from a dashboard. This also removes associated layout items. The response confirms success; no need to call dashboard_get to verify.
dashboard_remove_variable
ChatGPTRemove a variable from a dashboard by name. The response confirms success; no need to call dashboard_get to verify.
dashboard_rename_group
ChatGPTChange the title of a dashboard layout group.
dashboard_reorder_groups
ChatGPTChange the display order of layout groups in a dashboard.
dashboard_toggle_group_collapse
ChatGPTSet whether a dashboard layout group is collapsed or expanded.
dashboard_update
ChatGPTUpdate a dashboard's name and/or full Perses definition. For time range/refresh settings, use dashboard_update_settings. For individual panels, use dashboard_update_panel.
dashboard_update_panel
ChatGPTUpdate an existing panel's properties. Only provided fields are changed. For the full dashboard definition, use dashboard_update. For time range/refresh, use dashboard_update_settings.
dashboard_update_settings
ChatGPTUpdate dashboard time range and auto-refresh settings. For renaming or replacing the full definition, use dashboard_update. For individual panels, use dashboard_update_panel
dashboard_update_variable
ChatGPTUpdate an existing variable by name, replacing it with a new definition.
dashboard_update_variables
ChatGPTReplace all variables on a dashboard with the provided list.
get_agents_setup_prompt
ChatGPTReturn the AI-agent prompt to instrument an AI agent so it appears on the Agents page. Gives the exact instructions for emitting the OpenTelemetry GenAI invoke_agent / gen_ai.agent.name spans Logfire's Agents page needs. The prompt is project-agnostic: it only embeds this Logfire instance's base URL (so self-hosted deployments get their own endpoint), so this tool needs no project and never asks for a token.
get_feature_flags_setup_prompt
ChatGPTReturn the AI-agent prompt to set up runtime feature flags with Logfire managed variables. Gives the exact, project-scoped instructions for converting hard-coded values / env toggles into logfire.var(...) managed variables that change live from the UI or MCP. Follow the returned prompt; the SDK reads a project:read_variables key from LOGFIRE_API_KEY, which the user supplies out of band, so this tool never asks for the key.
get_infrastructure_setup_prompt
ChatGPTReturn the AI-agent prompt to set up infrastructure monitoring with Logfire. Gives the exact, project-scoped instructions for running an OpenTelemetry Collector that ships this surface's telemetry to Logfire and confirming it arrives. Follow the returned prompt; it references ${env:LOGFIRE_TOKEN} and never asks for the token.
get_instrumentation_setup_prompt
ChatGPTReturn the AI-agent prompt to instrument this application with the Logfire SDK. Gives the exact, project-scoped instructions for adding Logfire/OpenTelemetry to the codebase and confirming telemetry arrives. Follow the returned prompt; it reads the write token from the LOGFIRE_TOKEN env var and never asks for the token.
integration_install
ChatGPTInstall an integration into a project, enabling its standard dashboards and creating its alerts. Recommended-tier alerts install active; diagnostic-tier alerts install inactive (opt-in). All alerts install without a notification channel: add one to get notified. Idempotent: installing an already-installed integration refreshes its recorded version, re-enables the same standard dashboards, and skips alerts that already exist. Use list_integrations first to find valid integration ids.
integration_list
ChatGPTList the Integrations catalog with this project's install/detection state. Returns one entry per available integration (e.g. Redis), including whether it is installed, whether its telemetry has been detected in the project, the catalog version, and how many dashboards and alerts it bundles.
issue_get
ChatGPTGet a single tracked exception issue by its number, including the stacktrace. The issue number is the integer shown in the UI and in issue URLs (.../[organization]/[project]/issues/[issue_number]), so this resolves a shared issue link to full detail - including first_exception_stacktrace - in one call.
issue_list
ChatGPTList tracked exception issues for a project with cursor-based pagination. Returns issues (exceptions grouped by fingerprint) plus a next_cursor that callers pass back to fetch the following page. next_cursor is None when no further pages exist. Returns an empty list if issues are not enabled for the project.
issue_set_states
ChatGPTOpen, ignore, or resolve one or more exception issues. Use this when asked to ignore, dismiss, resolve, close, or reopen issues. Returns the updated issues.
local_dev_session
ChatGPTSet up a local development session for sending telemetry to Logfire. Creates a 'dev' project (if needed), generates a write token, and returns environment variables to configure the Logfire or OpenTelemetry SDK. All telemetry is sent to the dev project. Use the Logfire UI or MCP query tools to view traces in this project.
notification_window_create
ChatGPTCreate a new notification window that limits alert notification delivery to specific times.
notification_window_delete
ChatGPTPermanently delete a notification window. Alert-channel pairs using it will revert to always-deliver.
notification_window_get
ChatGPTGet a specific notification window by ID.
notification_window_list
ChatGPTList all notification windows in the organization. A notification window defines the times when alert notifications are delivered. Notifications outside the window are suppressed (dropped, not deferred).
project_list
ChatGPTList all readable projects for the authenticated user in their organization.
project_logfire_link
ChatGPTGenerate a Logfire UI link to view a specific trace. Returns a URL that opens the Logfire dashboard filtered to show the specified trace. The link includes since and until parameters when the trace timestamp lookup succeeds, helping the UI load the correct time range. If that optional lookup is unavailable, the returned trace-filter link still works without time hints.
project_logfire_ui_link
ChatGPTGenerate a Logfire project UI link for live-view/filter pages. Returns a URL for the project-level Logfire UI, optionally with q, since, and until parameters. Use wizard_return=True for the CLI wizard's browser return, which records a distinct project visit before Live View. Use handoff=True to bootstrap a browser session from MCP OAuth when opening the URL immediately. It cannot be combined with wizard_return=True.
prompt_get
ChatGPTGet a prompt by slug. Use the response's variable_name property with the variable_* tools to manage versions, labels, rollout, and template_inputs_schema.
prompt_get_settings
ChatGPTGet a prompt's playground settings (mutable, shared across versions).
prompt_get_version
ChatGPTGet a specific template version, including the raw template body.
prompt_list
ChatGPTList prompts in a project. Prompts also appear in variable_list as prompt-backed variables; use these prompt_* tools to edit their template and settings.
prompt_list_versions
ChatGPTList a prompt's template versions, ordered by version number.
prompt_preview
ChatGPTRender a saved prompt without calling the model. Expands @{...}@ composition references against live managed-variable values and fills {{...}} Handlebars placeholders from inputs (overlaid on the default scenario's saved inputs), spending no model tokens. Use it to confirm a template resolves as expected while authoring over MCP. Model execution (prompt_run) stays off the MCP surface.
query_exception_context
ChatGPTInspect up to three exception records in one trace, without fetching the whole trace or its attributes. Prefer this tool before writing SQL for an exception investigation. Supply the trace ID and a window of at most 24 hours around its timestamp. Stack traces contain at most the last 6,000 characters and 60 lines. Messages and other fields are also excerpts, not complete values. Use read_repository_source_context for a frame's file and line when repository tools are available. Resolve deployed paths with find_repository_files first. Repository paths start at the repository root. Use query_run only when the excerpts omit evidence needed for the task.
query_find_exceptions_in_file
ChatGPTGet the details about the 10 most recent exceptions matching a source file path.
query_run
ChatGPTRun a read-only SQL SELECT query against Logfire telemetry. The arguments are query, project, start_timestamp, end_timestamp, and intent. No other argument name is accepted. Do not pass sql, project_name, or min_timestamp. Rules that prevent the most common failures: 1. Time window. start_timestamp and end_timestamp set the window. The default is the last 30 minutes. The limit is 14 days. A window up to 15 days is clamped to the last 14 days with a note in the result. A longer one fails. A SQL time filter can narrow the window but cannot widen it. For a longer history, make one call per window of 14 days or less. 2. Project. Pass project unless the token has access to one project only. Use an exact name from project_list or from the error that lists the available projects. 3. Attributes. Read an attribute with attributes->>'dotted.key'. The result is text: cast it only for a numeric compare, for example (attributes->>'cost')::float. Do not cast columns that already have a type. Do not use attributes['key']. Do not guess a flat column name. An attribute has a flat column only if query_schema_reference lists it as a promoted column, for example http_route. 4. GROUP BY. Repeat every selected non-aggregate expression exactly in GROUP BY. Do not group by a SELECT alias. 5. Subqueries. The engine often cannot plan a correlated, scalar, EXISTS, or IN subquery. Use a JOIN, with a CTE where it helps. 6. Size. A response holds at most 1,000 rows and has a size cap. Add a LIMIT, 50 or fewer for exploration, and select only the columns you need. 7. Retries. Follow the retry guidance in the error. Unless it says to retry unchanged, change a failed query before the retry. After a timeout, narrow the window, add selective filters, or simplify the query. 8. Intent. Pass intent on every call. Keep it while the goal is unchanged; when you narrow to a sub-step, name the original goal in it. The engine is Apache DataFusion with Postgres-like SQL. The queryable tables are records, metrics, alerts_ext, alert_runs_ext, alert_issues_ext, filter_alert_issue_hits_ext, and saved_searches_ext. Use these exact names. There are no other tables. Cross-source joins are supported, for example a join of alert_issues_ext.latest_trace_id to records.trace_id. Only SELECT is supported. query_schema_reference is a tool, never a table. Call it once per session for the schema, the promoted columns, and the function rules. Call it again to diagnose an unknown column, an unknown function, or a type error. If your instructions already include a SQL reference, use that reference first. If query_schema_reference is not in your tools, the schema is already in your instructions.
query_schema_reference
ChatGPTGet the table schemas and the query handbook for the Logfire DataFusion database. Returns SQL CREATE TABLE statements for all queryable tables (records, metrics, alerts_ext, alert_runs_ext, alert_issues_ext, filter_alert_issue_hits_ext, and saved_searches_ext). The handbook lists the promoted flat columns, the JSON access rules, the functions that do not exist in DataFusion with their replacements, and how to find a function in information_schema.routines. Call this once per session, before the first non-trivial query_run. Call it again to diagnose an unknown column, an unknown function, or a type error. Do not call it before every query. If your instructions already include a SQL reference, use that reference first and call this tool only for what it does not cover. This is a tool, not a table.
schedule_create
ChatGPTDeprecated. Use notification_window_create. Create a new notification window that limits alert notification delivery to specific times. Args: label: Display name for the notification window, e.g. "Business Hours". timezone: IANA timezone, e.g. "America/New_York". windows: Array of time windows. Each has "days" (1=Mon..7=Sun), "start_time" and "end_time" (HH:MM). When start_time > end_time, the window crosses midnight.
schedule_delete
ChatGPTDeprecated. Use notification_window_delete. Permanently delete a notification window. Alert-channel pairs using it will revert to always-deliver. Args: schedule_id: The UUID of the notification window to delete.
schedule_get
ChatGPTDeprecated. Use notification_window_get. Get a specific notification window by ID. Args: schedule_id: The UUID of the notification window to retrieve.
schedule_list
ChatGPTDeprecated. Use notification_window_list. List all notification windows in the organization. A notification window defines the times when alert notifications are delivered. Notifications outside the window are suppressed (dropped, not deferred).
schedule_update
ChatGPTUpdate an existing schedule. Only provided fields are changed.
token_info
ChatGPTGet information about the current authentication token. Only call this when the user explicitly asks about their identity, account, or permissions, never as a preamble to other work. Returns the organization, user, scopes, and project (if the token is scoped to a specific project) associated with the token being used for this session.
variable_get
ChatGPTGet a managed variable (feature flag) by name, with optional version/history detail. The definition is always returned: template_inputs_schema (the typed-input contract for template variables, or null), latest_version (whose serialized_value is the raw stored value, including any un-rendered @{...}@ and {{...}} markup), current labels, rollout configuration, and overrides. For prompt-backed variables it also carries kind='prompt' and prompt_slug. Pass include to fetch extra detail in the same call, avoiding follow-up round trips: - "versions": all versions, ordered by version number. - "routing_history": the rollout/override change history. - "label_history": the assignment history of a single label (requires label).
variable_list
ChatGPTList all managed variables (feature flags) in a project. Returns a summary of each variable including name, description, rollout configuration, override count, label count, and version count. Prompt-backed variables (kind='prompt') are included in the listing and expose prompt_slug; their template/settings are managed with the prompt_* tools, while their versions, labels, and rollout are managed with variable_manage / variable_delete.
variable_resolve
ChatGPTResolve what value a client would receive for a variable right now, and why. Runs the live evaluation (rollout, labels, overrides, targeting) the same one the SDK and the OFREP endpoint use, for the given targeting context. Use it to answer "is my app getting the value I set in the UI, or still the in-code default?". serialized_value is the raw stored value that would be served; it's null when no version resolves, in which case is_code_default is true and the app uses its own in-code default. reason is one of STATIC / TARGETING_MATCH / SPLIT / DEFAULT, and label / version show which version was selected. A variable that was pushed from code but never released a version resolves to is_code_default=true, reason='DEFAULT', version=null.