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

# Tools Reference

Tools are the concrete actions behind the skills, grouped by domain. **Write tools come in `preview_*` and `commit_*` pairs:** the preview shows the change and returns a token; the commit applies it. The workspace is always resolved from the API key.

{% hint style="info" %}
You almost never need this page to use the MCP. You describe what you want, and the skill chooses the right tools. This index is here for completeness, for integrators, and for anyone who wants to see exactly what is possible under the hood.
{% endhint %}

***

## How a skill uses tools

A skill is the "playbook"; tools are the "actions." Take the request *"Improve my voice agent's prompt based on recent calls":*

1. The `voice-prompt-improver` skill activates.
2. It calls read tools (`get_agent`, `list_calls`, `get_call_outcomes`) to gather the agent's current prompt and recent call performance.
3. It drafts an improved prompt using the `voice-prompts` methodology.
4. It calls `preview_update_voice_agent_prompt` to show you the exact change and returns a preview token.
5. After you confirm, it calls `commit_update_voice_agent_prompt` to apply it.

You never need to know tool names or workspace IDs. The skills choose the right tools, and the key resolves your workspace automatically.

***

## Voice agents: discovery (7)

| Tool                          | What it does                                                          |
| ----------------------------- | --------------------------------------------------------------------- |
| `list_agents`                 | List all voice agents in the caller's workspace                       |
| `get_agent`                   | Get full details for a single voice agent                             |
| `get_agent_post_call_schema`  | Get the post-call analysis schema (extraction variables) for an agent |
| `get_agent_complete_analysis` | Get a complete lightweight analysis for an agent                      |
| `verify_agent_ownership`      | Verify the caller's workspace owns this agent                         |
| `get_agent_company_context`   | Get the company name and description linked to an agent               |
| `get_agent_context`           | Get the agent context row (identity, purpose, key instructions)       |

## Voice call analytics (14)

| Tool                             | What it does                                                 |
| -------------------------------- | ------------------------------------------------------------ |
| `list_calls`                     | List calls in the workspace, with optional filters           |
| `search_calls_by_phone`          | Search calls by phone number (from and to)                   |
| `get_agent_call_statistics`      | Aggregated call statistics by agent                          |
| `list_calls_with_audio`          | List calls that have a recording, with transcript previews   |
| `get_call_outcomes`              | Call outcomes with post-call analysis fields                 |
| `get_connection_rate`            | Connection-rate breakdown by disconnection reason            |
| `get_feature_usage`              | Feature usage (credits consumed) for the workspace           |
| `list_call_examples_by_category` | Example calls where a post-call variable equals a value      |
| `get_agent_call_volume_check`    | Check if an agent has enough call data for temporal analysis |
| `get_hourly_call_distribution`   | Hourly call distribution for an agent (timezone-aware)       |
| `get_weekday_call_distribution`  | Weekday call distribution (timezone-aware)                   |
| `temporal_heatmap`               | Weekday by hour call-density heatmap                         |
| `temporal_hourly_by_org`         | Workspace-level hourly call distribution                     |
| `workspace_satisfaction`         | Per-agent satisfaction score (like vs dislike), last 30 days |

## Voice agent variables (6)

| Tool                                  | What it does                                                          |
| ------------------------------------- | --------------------------------------------------------------------- |
| `discover_variables_from_calls`       | Discover output variables from actual call extractions                |
| `analyze_variable_usage`              | Analyze which declared output variables are actually populated        |
| `aggregate_variable_results`          | Aggregate call outcomes by variable value (count, avg, sum, min, max) |
| `find_input_variables`                | Find `{{variable}}` references in an agent's instructions             |
| `discover_agent_qualification_schema` | Discover qualification variables from recent extractions              |
| `find_qualified_leads`                | Find calls flagged as qualified leads                                 |

## Voice call feedback (5)

| Tool                     | What it does                                                  |
| ------------------------ | ------------------------------------------------------------- |
| `get_feedback_summary`   | Per-agent feedback summary (last 30 days)                     |
| `list_recent_feedback`   | Recent feedback events (votes and comments), last 7 days      |
| `list_negative_feedback` | Negative feedback (dislikes) for an agent, last 30 days       |
| `get_feedback_trends`    | Daily feedback trends for an agent, last 30 days              |
| `get_comment_sentiment`  | Keyword-based sentiment and problem-type tagging for comments |

## Text and chat agents (15)

| Tool                                    | What it does                                               |
| --------------------------------------- | ---------------------------------------------------------- |
| `list_all_text_agents`                  | List text agents (v2 and active v1 legacy)                 |
| `search_text_agent`                     | Search text agents (v2 and v1) by name or UUID             |
| `search_text_agents_by_name`            | Search by partial name (SQL view)                          |
| `get_text_agent_details`                | Full record (v2 first, v1 fallback)                        |
| `get_v1_agent_details`                  | Legacy v1 record with message statistics                   |
| `get_text_agent_details_query`          | v2 complete configuration and usage stats                  |
| `get_text_agent_company_context`        | Company context linked to a text agent                     |
| `get_text_agent_context`                | Agent context row linked to a text agent                   |
| `get_text_agent_conversations`          | Conversations for a text agent (v2 inbox)                  |
| `count_summary`                         | Text-agent counts by architecture (v1 or v2) and status    |
| `top_agents_by_messages`                | Rank text agents by message volume                         |
| `get_workspace_whatsapp_lines`          | Connected channels: WhatsApp lines and usage               |
| `get_widget_config`                     | Widget configuration (linked voice agent) for a text agent |
| `list_voice_agents_for_widget`          | Voice agents available to link as the widget voice agent   |
| `generate_text_agent_example_questions` | Generate starter questions for a text agent                |

## Flow Studio automations (12)

| Tool                         | What it does                                                |
| ---------------------------- | ----------------------------------------------------------- |
| `get_workspace_flows`        | List workspace flows with metadata                          |
| `get_flow_execution_stats`   | Execution statistics for flows                              |
| `get_workspace_integrations` | Configured OAuth integrations and database connections      |
| `get_flow_details`           | Detail of a single flow by ID or fuzzy name                 |
| `get_flow_versions`          | Version history for a flow                                  |
| `get_flow_webhook_url`       | Resolve a flow's public webhook URL                         |
| `get_flow_input_schema`      | Inspect a flow's trigger node to expose payload fields      |
| `search_flow_templates`      | Search public flow templates (global)                       |
| `get_flow_template_by_id`    | Fetch a flow template by UUID (global)                      |
| `search_node_templates`      | Search public node templates (flow building blocks)         |
| `get_node_template_by_id`    | Fetch a node template by UUID (global)                      |
| `validate_flow_structure`    | Validate a flow JSON against Flow Studio rules (in-process) |

## Sales-meeting analytics (8)

| Tool                                | What it does                                     |
| ----------------------------------- | ------------------------------------------------ |
| `get_meeting_by_bot_id`             | Get a meeting by bot\_id                         |
| `get_organization_meetings`         | List meetings for the workspace, newest first    |
| `search_meetings_by_title`          | Search meetings by title (case-insensitive)      |
| `get_organization_calendars`        | List connected calendars                         |
| `get_scheduled_bots`                | List upcoming calendar-driven recordings         |
| `get_meeting_with_calendar_context` | A meeting joined with its calendar event         |
| `get_current_workspace_meetings`    | Most recent workspace meetings (default last 10) |
| `get_meeting_statistics`            | Aggregate meeting statistics for the workspace   |

## Identity registry: accounts, users, workspaces, industry (22)

| Tool                                | What it does                                             |
| ----------------------------------- | -------------------------------------------------------- |
| `get_user_workspaces`               | IAM workspaces a user belongs to (all accounts)          |
| `get_workspace_company_context`     | Merged company context for the workspace                 |
| `search_iam_account`                | Search IAM accounts by name or UUID                      |
| `get_iam_account_details`           | Account row with subscription, status, and owner         |
| `get_user_accounts`                 | All IAM accounts owned by a user                         |
| `list_iam_workspaces`               | Workspaces under an IAM account                          |
| `search_iam_user`                   | Search IAM users by email, name, or UUID                 |
| `get_workspace_by_id`               | A single IAM workspace row by UUID                       |
| `get_account_workspace_ids`         | All workspace IDs (and names) under an account           |
| `verify_workspace_entity_ownership` | Verify an entity belongs to the caller's IAM scope       |
| `map_legacy_to_iam`                 | Enrich a Legacy organization\_id with IAM context        |
| `map_iam_to_legacy`                 | List Legacy organization\_ids under an IAM account       |
| `get_industry_overview`             | Platform-wide distribution of accounts across industries |
| `get_use_case_recommendations`      | Use-case recommendations based on industry peers         |
| `infer_industry_from_agents`        | Infer a workspace's industry from agent instructions     |
| `classify_account_industry`         | Multi-source industry classifier (slow, 5 to 15s)        |
| `get_account_classification`        | Fast cached industry classification lookup               |
| `get_industry_from_iam`             | Explicit industry from the onboarding form               |
| `get_timing_patterns`               | Temporal call patterns (hour by weekday) for an account  |
| `get_top_accounts_by_industry`      | Top performing accounts by industry                      |
| `get_use_case_adoption_by_industry` | Adoption percentages of standard use cases per industry  |
| `infer_industry_from_context`       | Infer industry from the company description              |

## Billing and subscription (3)

| Tool                  | What it does                                  |
| --------------------- | --------------------------------------------- |
| `get_my_balance`      | Credit balance for the caller's account       |
| `get_my_usage`        | Daily credit usage for the caller's account   |
| `get_my_subscription` | Subscription details for the caller's account |

## Support (6)

| Tool                               | What it does                                             |
| ---------------------------------- | -------------------------------------------------------- |
| `list_tickets_by_email`            | Support history (conversations and tickets) for an email |
| `get_ticket_distribution_by_email` | Counts of an email's history by state or type            |
| `list_tickets_by_workspace`        | Workspace-wide support rollup                            |
| `get_ticket_card`                  | A single ticket as a structured card                     |
| `preview_create_ticket`            | Preview creating a ticket (no commit)                    |
| `commit_create_ticket`             | Commit a ticket using a preview token                    |

## Dapta documentation (5)

| Tool                     | What it does                                   |
| ------------------------ | ---------------------------------------------- |
| `docs_search`            | Search Dapta documentation                     |
| `docs_get_page`          | Fetch the full markdown of a single docs page  |
| `docs_list_sections`     | List top-level docs table-of-contents sections |
| `docs_search_code`       | Search code blocks across the docs             |
| `docs_get_section_pages` | List the pages within a docs section           |

## Web search and research (3)

| Tool                         | What it does                                                         |
| ---------------------------- | -------------------------------------------------------------------- |
| `tavily_search`              | Search the web for current information on any topic                  |
| `tavily_extract`             | Extract clean content from one or more URLs                          |
| `generate_research_document` | Generate a downloadable Word .docx from a research query and sources |

## Writes: agents, prompts, widgets, flows (21)

Every write is a `preview_*` and `commit_*` pair. The preview returns a token and shows the exact change; the commit applies it only when given that token.

| Tool                                                                     | What it does                                |
| ------------------------------------------------------------------------ | ------------------------------------------- |
| `create_voice_agent`                                                     | Create a new voice agent                    |
| `preview_update_voice_agent` / `commit_update_voice_agent`               | Update a voice agent's configuration        |
| `preview_update_voice_agent_prompt` / `commit_update_voice_agent_prompt` | Update a voice agent's prompt only          |
| `preview_create_text_agent` / `commit_create_text_agent`                 | Create a text agent                         |
| `preview_update_text_agent` / `commit_update_text_agent`                 | Update a text agent's instructions          |
| `preview_update_widget_voice_agent` / `commit_update_widget_voice_agent` | Attach a voice agent to a text-agent widget |
| `preview_remove_widget_voice_agent` / `commit_remove_widget_voice_agent` | Detach the widget's voice agent             |
| `preview_create_flow` / `commit_create_flow`                             | Create a Flow Studio flow                   |
| `preview_create_flow_folder` / `commit_create_flow_folder`               | Create a flow folder                        |
| `preview_update_flow` / `commit_update_flow`                             | Update a flow                               |
| `preview_execute_flow` / `commit_execute_flow`                           | Execute a flow                              |


---

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

```
GET https://docs.dapta.ai/dapta-mcp/tools-reference.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.
