> For the complete documentation index, see [llms.txt](https://docs.corraldata.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.corraldata.com/kb/mcp/usage-examples.md).

# Usage Examples

## Usage Examples

These examples show real conversations you can have with Claude or ChatGPT once the CorralData integration is connected.

***

#### Example 1: Explore your data and run a query

**Goal**: Understand your database structure and pull a specific metric.

> **You**: What schemas and tables do I have available?

Claude/ChatGPT calls `list_schemas` and `list_tables` to map out your data model and returns a summary.

> **You**: Describe the appointments and providers tables

Claude/ChatGPT calls `describe_tables` to retrieve column names, types, and relationships for both tables at once.

> **You**: How are those two tables related?

Claude/ChatGPT calls `get_relationships` filtered to those tables and shows the foreign key connections.

> **You**: Write a query to show total appointment revenue by provider for the last 30 days, ordered by highest first

Claude/ChatGPT uses the schema context to write accurate SQL and executes it with `execute_sql`, returning the results in a table.

***

#### Example 2: Build a location performance dashboard

**Goal**: Create a new board with widgets to compare performance across locations.

> **You**: Create a new board called "Location Performance"

Claude/ChatGPT calls `create_board` and returns the new board with its URL.

> **You**: Add a KPI widget showing total revenue this month across all locations

Claude/ChatGPT writes the SQL, validates it with `validate_widget_query`, then calls `create_widget` with a KPI chart type.

> **You**: Now add a bar chart showing revenue by location

Claude/ChatGPT creates a bar chart widget, placing it below the KPI.

> **You**: Add a location filter so users can drill into a specific practice

Claude/ChatGPT calls `create_board_filter` to add an interactive filter that connects to all widgets on the board.

***

#### Example 3: Analyze and improve an existing dashboard

**Goal**: Review what's on an existing board and fix an issue.

> **You**: Show me all my boards

Claude/ChatGPT calls `list_boards` and presents a summary with names and URLs.

> **You**: What widgets are on the "Monthly Operations" board?

Claude/ChatGPT calls `get_board` then `list_widgets` to show all widgets with their types and queries.

> **You**: The "Avg Ticket Value" widget looks off. Show me its query

Claude/ChatGPT calls `get_widget` to retrieve the full widget configuration and SQL.

> **You**: It's including voided appointments — fix the query to exclude those

Claude/ChatGPT updates the SQL, validates it with `validate_widget_query`, then calls `update_widget` to save the fix.

***

#### Example 4: Investigate a metric drop

**Goal**: Use natural language to dig into a performance issue.

> **You**: I need to understand why our botox revenue dropped last month. What tables do we have related to treatments or services?

Claude/ChatGPT calls `search_tables` with relevant keywords and returns matching tables.

> **You**: Describe those tables — I need to understand the columns

Claude/ChatGPT calls `describe_tables`, showing columns, types, and relationships.

> **You**: What are the possible values in the treatment\_category column?

Claude/ChatGPT calls `get_column_values` to retrieve distinct values so filters will be accurate.

> **You**: Write a query comparing botox appointment volume and revenue month-over-month for the last 6 months

Claude/ChatGPT writes and executes the query with `execute_sql`, returning a table you can analyze directly in the conversation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.corraldata.com/kb/mcp/usage-examples.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
