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

# Tiledesk Knowledge Base MCP

The **Tiledesk Knowledge Base MCP** lets an AI Agent retrieve answers directly from a Tiledesk Knowledge Base while running inside an AI Prompt.

Instead of building a separate knowledge-retrieval step in the flow, you can tell the AI Agent when to use the Knowledge Base and let it call the **ASK\_KB** tool automatically.

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FgZYBiBUWOk6JVEaaQEc5%2FGuide%20Articles%20(3).png?alt=media&amp;token=cdcf4197-6afd-4031-a440-b353b4140961" alt=""><figcaption></figcaption></figure>

### Why use the Knowledge Base MCP

The main benefit is that knowledge retrieval becomes part of the same AI-driven workflow.

* Answer user questions using your existing Tiledesk Knowledge Base.
* Keep answers grounded in approved company content.
* Use the user's actual message as the Knowledge Base query.
* Combine knowledge retrieval with other MCP tools in the same AI Prompt.
* Build support, sales, and internal-assistance flows with less manual orchestration.

For example, an AI Agent can receive a support question, search the Knowledge Base, reply with the answer, and then continue with qualification, handoff, or another action without leaving the AI Prompt.

### Available tool

The Knowledge Base MCP currently provides:

* **ASK\_KB** — sends a question to a Tiledesk Knowledge Base and returns the answer to the AI Agent.

The tool returns the Knowledge Base answer as text. The AI Agent can then send that answer to the user or use it as part of a larger workflow.

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2Fzqt9XnEs9V1HTkaNGJhW%2FUntitled.001.001.png?alt=media&amp;token=68eed52d-3de0-420f-97d1-6d44ff3670e5" alt=""><figcaption></figcaption></figure>

### Set up a simple Knowledge Base flow

{% stepper %}
{% step %}

#### Enable the Knowledge Base MCP

Open the AI Prompt action where you want the Agent to answer questions using your Knowledge Base.

Enable the **Tiledesk Knowledge Base MCP** so the Agent can access **ASK\_KB**.

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FfdjTdI7BCobAOdFP6H5P%2FGuide%20Articles%20(4).png?alt=media&amp;token=1403a7c2-c9d7-416e-a4ef-821636f6b626" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FMDy9BL2yINlm4UeB0xnJ%2FGuide%20Articles%20(5).png?alt=media&amp;token=2aef348e-76c6-4030-bc9e-9d2270a21e47" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FKEa62WBsPiqu3SnU3IFN%2FGuide%20Articles%20(6).png?alt=media&amp;token=b463b4d4-6c6a-47d6-bc97-318ace5fb0c1" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Use the correct Knowledge Base namespace

The **ASK\_KB** tool needs the Knowledge Base namespace.

For example, if your Knowledge Base namespace is `Default`, use:

```
namespace = "Default"
```

Use the exact namespace configured in your Tiledesk project.

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FTl6ePaXKavnoVWSaoLLP%2FGuide%20Articles%20(7).png?alt=media&amp;token=93b9aad6-2072-4eba-bca9-0c657682e058" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Add a simple prompt

The following prompt tells the Agent to use the user's actual message as the Knowledge Base question.

{% prompt description="Use the Knowledge Base to answer user questions" icon="sparkles" openInAIProviders="false" defaultExpanded="full" %}

```
You are a Tiledesk support AI Agent. Use ASK_KB with:
- namespace = "Default"
- question = the user's actual message

If the Knowledge Base returns an answer, reply to the user with that answer.
Do not invent information.
Keep the answer short and clear.
```

{% endprompt %}

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FGZhFknppfLMFSWVIluQ8%2FGuide%20Articles%20(8).png?alt=media&amp;token=76a6b443-136d-45ff-8343-000a886eec86" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Test the flow

Start a conversation with a question that is already covered by your Knowledge Base.

**User:** My account is locked and I can't log in.

If the Knowledge Base contains a matching FAQ or source, the Agent should retrieve the answer with **ASK\_KB** and reply directly to the user.

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2F2k5NYRZYDQOnp5NqdzPP%2FGuide%20Articles%20(9).png?alt=media&amp;token=dddbff97-bd3b-48f7-befc-b65c901ee29e" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### Combine Knowledge Base with other Tiledesk MCP tools

The Knowledge Base MCP becomes more useful when combined with other Tiledesk MCP tools inside the same AI Prompt.

For example:

User asks a product or support question → **ASK\_KB** retrieves the answer → the Agent asks for name and email → **Data Tables MCP** saves the lead.

Or:

User asks a support question → **ASK\_KB** retrieves the answer → the issue remains unresolved → **Communicator MCP** checks agent availability and handles human handoff.

This lets you create complete AI Agent workflows using one prompt instead of building every action manually as a separate step.

### Example use cases

* Customer support FAQ automation
* Product and service information
* Internal company knowledge assistance
* Sales questions during lead qualification
* Knowledge-based troubleshooting
* Support flows with human handoff

### Troubleshooting

<details>

<summary>Namespace not found</summary>

If you receive an error such as `namespace_not_found`, check that the namespace in the prompt exactly matches the Knowledge Base namespace configured in Tiledesk.

For example:

Use `Default` if the namespace is actually named `Default`. Do not use a different label such as `Default Knowledge Base` unless that is the real namespace name.

</details>

<details>

<summary>No answer from the Knowledge Base</summary>

Test your flow with questions that are actually covered by the Knowledge Base. If a question is outside the available content, the Knowledge Base may not be able to provide a useful answer.

For production flows, combine the Knowledge Base MCP with a fallback strategy such as human handoff or another workflow branch.

</details>

### Next step

Once the Knowledge Base MCP is working, combine it with the [Tiledesk Communicator MCP](/tiledesk-mcp-tools/tiledesk-communicator-mcp.md) and [Tiledesk Data Tables MCP](/tiledesk-mcp-tools/tiledesk-data-tables-mcp.md) to build a complete flow that can answer questions, collect lead information, and save structured data automatically.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://guide.tiledesk.com/tiledesk-mcp-tools/tiledesk-knowledge-base-mcp.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
