#Can I send dynamic variables to be used by MCP tools?In my example all tools are used through the

1 messages · Page 1 of 1 (latest)

final hornetBOT
#
AI-generated Answer for magical_armadillo_77715

Short answer: Yes—with dynamic variables.

What’s documented

  • You can define dynamic variables and use them in prompts and tool parameters/headers. They can also be updated from tool responses using “dynamic variable assignment.” (elevenlabs.io)
  • Client and server tools can update dynamic variables (system tools cannot). (elevenlabs.io)
  • ElevenLabs supports integrating external MCP servers; you control approval and transport. Note: MCP is not available in Zero Retention Mode or for HIPAA. (elevenlabs.io)

How to implement your flow (Appointment Type → Locations)

  • Create a dynamic variable (e.g., appointment_type_id). You can inject it into the agent’s system prompt, first message, and tool parameters using {{appointment_type_id}}. (elevenlabs.io)
  • After the “Select Appointment Type” tool returns an ID, persist it by mapping the tool’s JSON response path to the dynamic variable via dynamic variable assignment (server tool flow). Example: map response.appointment_type.id → appointment_type_id. (elevenlabs.io)
  • Use the dynamic variable in the next tool call (e.g., Get Locations), passing {{appointment_type_id}} in the tool’s required parameters/headers. (elevenlabs.io)

Important MCP-specific note

  • ElevenLabs’ MCP docs cover connection and approval but do not document dynamic variable assignment from MCP tool responses. If all of your tools are MCP tools, the safe, documented way to persist and reuse the ID is to:
    • Rely on the LLM (via prompt instructions) to pass the previously returned ID when calling the next MCP tool, and/or
    • Add a minimal server webhook tool whose sole purpose is to write the returned ID into a dynamic variable via assignment, then reference {{appointment_type_id}} in subsequent calls. (elevenlabs.io)

References

  • Model Context Protocol (MCP) integration overview and limitations. (elevenlabs.io)
  • Dynamic variables: usage in prompts/tools and updating from tool responses. (elevenlabs.io)
  • Server tools: orchestration and dynamic variable assignment in tool config. (elevenlabs.io)
  • Client tools: can also update dynamic variables; system tools cannot. (elevenlabs.io)
  • Changelog confirming MCP server integration and dynamic-variable features in Conversational AI.
humble laurel
#

Assuming I need to "rely on the LLM (via prompt instructions) to pass the previously returned ID when calling the next MCP tool". Can you create an example prompt that would facilitate this?