#How can I test a tool invocation from our own MCP server? It looks like the UI doesn't support it.

1 messages · Page 1 of 1 (latest)

umbral thicketBOT
#
AI-generated Answer for hussein_66986

Short answer: there isn’t a documented “execute this MCP tool now” endpoint. Testing MCP tools is done by driving an agent to call the tool and validating the call, either with Agent Testing or with conversation simulation.

What you can do today

  • Register your MCP server (via API if you prefer), then attach it to an agent.

    • Create/list MCP servers: POST/GET /v1/convai/mcp-servers. (elevenlabs.io)
    • Approval modes (Always ask / per‑tool / auto): documented under MCP. (elevenlabs.io)
  • Verify the tool is visible to the agent

    • List tools in your workspace: GET /v1/convai/tools. (elevenlabs.io)
  • Test a specific tool invocation (recommended)

    • Create a Tool Call Test that names your tool and specifies expected parameters (exact/regex/LLM‑evaluated). POST /v1/convai/agent‑testing/create. (elevenlabs.io)
    • Run the test against your agent: POST /v1/convai/agents/{agent_id}/run‑tests. (elevenlabs.io)
    • Inspect the run (see tool_calls, params, pass/fail): GET /v1/convai/test‑invocations/{id}. (elevenlabs.io)
  • Alternatively, simulate a conversation that should cause the agent to call your MCP tool

    • Non‑streaming: POST /v1/convai/agents/{agent_id}/simulate‑conversation. (elevenlabs.io)
    • Streaming: POST /v1/convai/agents/{agent_id}/simulate‑conversation/stream. (elevenlabs.io)

Key notes

  • ElevenLabs’ MCP integration supports SSE and HTTP streamable transports; you manage approval policies globally or per tool. (elevenlabs.io)
  • The docs do not expose a standalone API to invoke an MCP tool outside an agent flow; the supported path is to have the agent decide/call the tool and validate via tests/simulations. (elevenlabs.io)

If helpful, here’s the MCP overview and setup guide used above. (elevenlabs.io)

Sources:
Create MCP server | ElevenLabs Documentation
Model Context Protocol | ElevenLabs Documentation
List tools | ElevenLabs Documentation
Create test | ElevenLabs Documentation
Run tests on agent | ElevenLabs Documentation
Get test invocation | ElevenLabs Documentation
Simulate conversation | ElevenLabs Documentation
Stream simulate conversation | ElevenLabs Documentation
Model Context Protocol | ElevenLabs Documentation
Model Context Protocol | ElevenLabs Documentation
Model Context Protocol | ElevenLabs Documentation

pure hedge
#

'detail': [{'type': 'value_error', 'loc': ['body'], 'msg': 'Value error, Message evaluation and tool call evaluation cannot be used together. ', 'input': {'name': 'Book appointment with correct flow and tool sequence (Oil Change + Shuttle 4)', 'chat_history': [{'role': 'user', 'message': 'Hi, I’d like to book an oil change.', 'time_in_call_secs': 5}, {'role': 'agent', 'message': 'Sure thing! Can I get your full name?', 'time_in_call_secs': 7}, {'role': 'user', 'message': 'Hussein Warsame', 'time_in_call_secs': 9}, {'role': 'agent', 'message': 'Thanks, Hussein. What’s the best phone number to reach you at?', 'time_in_call_secs': 11}, {'role': 'user', 'message': '7809343877', 'time_in_call_secs': 13}, {'role': 'agent', 'message': 'Got it — and what vehicle are we servicing today?', 'time_in_call_secs': 15}, {'role': 'user', 'message': '2024 Toyota Corolla Cross', 'time_in_call_secs': 17}, {'role': 'agent', 'message': 'Perfect. Would you like to request a shuttle ride for your appointment?', 'time_in_call_secs': 19}, {'role': 'user', 'message': 'Yes, please.', 'time_in_call_secs': 21}, {'role': 'user', 'message': 'Can you book me for October 15th?', 'time_in_call_secs': 24}], 'type': 'tool', 'success_condition': 'calls get_available_times before scheduling.', 'success_examples': [{'response': 'Let me check what times we have available on October 15th for your oil change and shuttle.', 'type': 'success'}], 'failure_examples': [{'response': 'All set! You’re booked for an oil change on October 15th.', 'type': 'failure'}, {'response': 'Sure, booking you in now.', 'tool_calls': [], 'type': 'failure'}], 'tool_call_parameters': {'parameters': [{'eval': {'type': 'anything'}, 'path': 'parameters'}]}}, 'ctx': {'error': {}}}]}

umbral thicketBOT
#
AI-generated Answer for hussein_66986

You’re hitting a 422 because your request mixes two different test modes in one payload. ElevenLabs Agent Testing supports exactly one of the following per test:

  • Scenario (LLM/message) evaluation, or
  • Tool call evaluation

Combining message evaluation fields (success_condition, success_examples, failure_examples) with tool_call_parameters in the same test is not allowed. This is why you see “Message evaluation and tool call evaluation cannot be used together.” The docs describe these as two separate test types.

How to fix:

  • If you want a Tool Call Test: set type to "tool", keep chat_history and tool_call_parameters, and remove success_condition, success_examples, and failure_examples.
  • If you want a Scenario (LLM) Test: set type to "llm", keep chat_history, success_condition, success_examples, and failure_examples, and remove tool_call_parameters.

You can verify the test object shape (including type and tool_call_parameters) via the Get Test endpoint, and run tests against an agent with the Run Tests endpoint.

If you need to validate both the wording and the tool usage, create two separate tests—one “llm” and one “tool”—and run them together in a suite.

pure hedge
#

{'detail': [{'type': 'missing', 'loc': ['body', 'success_examples'], 'msg': 'Field required', 'input': {'name': 'Book appointment with correct flow and tool sequence (Oil Change + Shuttle 4)', 'chat_history': [{'role': 'user', 'message': 'Hi, I’d like to book an oil change.', 'time_in_call_secs': 5}, {'role': 'agent', 'message': 'Sure thing! Can I get your full name?', 'time_in_call_secs': 7}....