Skip to content

Using MCP Tools in the Maat HuggingFace Chat UI

The Maat HuggingFace Chat UI is a chat assistant that can answer questions about your Maat inventory and its events history in EventListener. It does this by calling MCP tools - functions that query the Maat and EventListener REST APIs.

Homepage panel of Maat HuggingFace Chat UI

This page focuses on the practical side of the integration: how to make sure that chat is actually connected to the MCP servers, how to pick a model that can use the tools, and how to read the tool calls that appear in the assistant's answers.

Note

For installation and configuration details, see:

Before you start: is the connection working?

Tools only work if at least one MCP server is enabled and connected.

  1. In the chat input, click the + button and choose Manage MCP Servers (you can also reach it from Settings → MCP Servers). MCP Servers panel showing a Connected server and its tools count

  2. In the MCP Servers panel, each server is shown as a card with:

    • a status — Connected, Connecting… or Disconnected,
    • an Enable switch,
    • a tools count — e.g. "12 tools",
    • a Health Check button.
  3. Turn the server on with the Enable switch, then click Health Check.
  4. Confirm the status becomes Connected and the tools count is greater than zero. You can expand the card to see the individual tools. MCP Servers panel showing a Connected server and its tools count

No tools, no answers from Maat or EventListener

If a server stays Disconnected or shows 0 tools, the assistant can not query Maat — it will answer from general knowledge instead. Always verify the server is Connected before using.

The critical step: the model must support tool calling

There is no automatic detection. For the assistant to use MCP tools, the selected model must support tool (function) calling. Not every model on the list may support and enabling an MCP server is not enough on its own - you need to be sure that model supports tools and enable it manually.

Toll calling option

When one or more MCP servers are enabled, a small MCP (n) badge appears next to the chat input:

Badge appearance Meaning
Active badge with the number of MCP servers The current model supports tools — you are good to go.
Greyed-out and struck-through badge The current model cannot use tools — the servers will be ignored.

Badge with MCP Servers

If the badge is struck through, switch models

Open the model selector and choose a model that supports tool calling. A Connected server with a struck-through badge will not produce tool calls and answer correctly.

Quick checklist before you ask

Before trusting an answer about your data, confirm all three:

  • Server(s): enabled, Health Check passed, status Connected, tools count > 0.
  • Model: supports tool calling function, the MCP (n) badge is active (not greyed-out / struck-through).
  • Then ask your question.

Seeing the tools in action

When everything is wired up, you can watch the assistant use the tools. Try one of the built-in starter prompts from the empty-conversation screen, for example:

"What resources and services do I have in Maat?"

As the assistant answers, two things become visible:

  • In its reasoning / thinking, the assistant explains that it is going to look something up and which query it will run.
  • In the response, each query appears as a collapsible "tool" block showing the tool name, the parameters it was called with and the result that came back. Expand it to see exactly what the assistant asked for.

An expanded tool block showing the tool name, parameters and result

Second example

Read the tool block to sanity-check the answer

If a reply looks wrong, expand the tool block and check the parameters. Most "wrong" answers come from the model querying with the wrong filter — the tool block makes that visible so you can rephrase your question.

Troubleshooting

Symptom What it means What to do
MCP (n) badge is greyed-out / struck-through The selected model doesn't support tools Switch to a model that supports tool calling.
Server stuck on Disconnected or 0 tools The server is unreachable or not enabled Toggle Enable on, click Health Check, and check the server is running.
Assistant answers without using any tool Model doesn't support tools, or no server is enabled Verify the badge is active and a server is Connected; then ask again, explicitly requesting live Maat data.
The data looks wrong The tool was likely called with the wrong parameters Expand the tool block, check the parameters, and rephrase the question.

Tips for good results

  • Ask in plain language — you don't need to name tools or parameters; the assistant maps your question to the right calls.
  • Maat data is the source of truth. The assistant reads your current Maat inventory, so its answers reflect the real state, not a cached snapshot.
  • Maat and EventListener are linked by the object id. You can ask for the current state of a resource in Maat and then for its change history in EventListener, and the assistant will connect the two.