# Usage Examples

## Usage Examples

These examples show real conversations you can have with Claude 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 calls `list_schemas` and `list_tables` to map out your data model and returns a summary.

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

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

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

Claude 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 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 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 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 creates a bar chart widget, placing it below the KPI.

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

Claude 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 calls `list_boards` and presents a summary with names and URLs.

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

Claude 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 calls `get_widget` to retrieve the full widget configuration and SQL.

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

Claude 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 calls `search_tables` with relevant keywords and returns matching tables.

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

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

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

Claude 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 writes and executes the query with `execute_sql`, returning a table you can analyze directly in the conversation.


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
