tavus-cli 0.12.0__tar.gz → 0.13.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. tavus_cli-0.13.0/.release-please-manifest.json +3 -0
  2. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/CHANGELOG.md +7 -0
  3. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/PKG-INFO +19 -1
  4. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/README.md +18 -0
  5. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/packages/tavus/pyproject.toml +2 -2
  6. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/packages/tavus-mcp/pyproject.toml +2 -2
  7. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/pyproject.toml +1 -1
  8. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/__init__.py +1 -1
  9. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/recipes/conversations.py +8 -2
  10. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/server.py +10 -3
  11. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/integration/test_mcp_server.py +42 -0
  12. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/uv.lock +1 -1
  13. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/package-lock.json +2 -2
  14. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/package.json +1 -1
  15. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/src/tavus.ts +17 -5
  16. tavus_cli-0.13.0/workers/tavus-mcp/src/version.ts +1 -0
  17. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/test/conversations.test.ts +55 -2
  18. tavus_cli-0.12.0/.release-please-manifest.json +0 -3
  19. tavus_cli-0.12.0/workers/tavus-mcp/src/version.ts +0 -1
  20. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/.agents/plugins/marketplace.json +0 -0
  21. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/.cursor/BUGBOT.md +0 -0
  22. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/.env.example +0 -0
  23. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/.github/review-guidelines.md +0 -0
  24. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/.github/workflows/ci.yml +0 -0
  25. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/.github/workflows/claude-pr-review.yml +0 -0
  26. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/.github/workflows/codex-pr-review.yml +0 -0
  27. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/.github/workflows/deploy-cloudflare-worker.yml +0 -0
  28. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/.github/workflows/pr-reviews.yml +0 -0
  29. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/.github/workflows/pypi-cli.yml +0 -0
  30. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/.github/workflows/tail-cloudflare-worker.yml +0 -0
  31. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/.github/workflows/validate-staging-deployment.yml +0 -0
  32. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/.gitignore +0 -0
  33. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/AGENTS.md +0 -0
  34. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/PROMPT.md +0 -0
  35. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/docs/builder-guidance.md +0 -0
  36. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/docs/chatgpt-plugin.md +0 -0
  37. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/docs/gemini-enterprise/README.md +0 -0
  38. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/docs/gemini-enterprise/listing.md +0 -0
  39. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/docs/gemini-enterprise/test-queries.md +0 -0
  40. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/docs/usage-observability.md +0 -0
  41. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/packages/tavus/README.md +0 -0
  42. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/packages/tavus-mcp/README.md +0 -0
  43. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/plugins/tavus-pal/assets/icon-dark.svg +0 -0
  44. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/plugins/tavus-pal/assets/icon.svg +0 -0
  45. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/plugins/tavus-pal/mcp.json +0 -0
  46. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/plugins/tavus-pal/plugin.json +0 -0
  47. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/release-please-config.json +0 -0
  48. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/scripts/__init__.py +0 -0
  49. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/scripts/build_chatgpt_plugin.py +0 -0
  50. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/scripts/check_release_versions.py +0 -0
  51. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/skills/tavus-agentic-pals/SKILL.md +0 -0
  52. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/skills/tavus-agentic-pals/agents/openai.yaml +0 -0
  53. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/skills/tavus-agentic-pals/references/build-and-verify.md +0 -0
  54. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/skills/tavus-agentic-pals/references/builder-workflow.md +0 -0
  55. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/skills/tavus-agentic-pals/references/chat-mode.md +0 -0
  56. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/skills/tavus-agentic-pals/references/examples.md +0 -0
  57. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/builder_guidance.json +0 -0
  58. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/builder_guidance.py +0 -0
  59. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/cli/__init__.py +0 -0
  60. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/cli/main.py +0 -0
  61. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/__init__.py +0 -0
  62. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/auth/__init__.py +0 -0
  63. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/auth/keyring_store.py +0 -0
  64. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/auth/oauth.py +0 -0
  65. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/auth/session.py +0 -0
  66. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/client/__init__.py +0 -0
  67. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/client/http.py +0 -0
  68. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/daily_transport.py +0 -0
  69. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/env.py +0 -0
  70. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/errors.py +0 -0
  71. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/pal_urls.py +0 -0
  72. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/patch.py +0 -0
  73. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/recipes/__init__.py +0 -0
  74. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/recipes/build_and_verify.py +0 -0
  75. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/recipes/capabilities.py +0 -0
  76. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/recipes/carrier_builder.py +0 -0
  77. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/recipes/deployments.py +0 -0
  78. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/recipes/face_studio.py +0 -0
  79. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/recipes/knowledge.py +0 -0
  80. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/recipes/meetings.py +0 -0
  81. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/recipes/options.py +0 -0
  82. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/recipes/quickstart.py +0 -0
  83. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/recipes/scaffold_embed.py +0 -0
  84. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/recipes/templates.py +0 -0
  85. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/recipes/tool_reuse.py +0 -0
  86. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/schemas/__init__.py +0 -0
  87. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/schemas/deployment.py +0 -0
  88. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/schemas/face_studio.py +0 -0
  89. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/schemas/file_manifest.py +0 -0
  90. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/schemas/guardrail.py +0 -0
  91. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/schemas/objective.py +0 -0
  92. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/schemas/pal.py +0 -0
  93. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/schemas/pronunciation.py +0 -0
  94. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/src/tavus_mcp/sdk/schemas/tool.py +0 -0
  95. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/conftest.py +0 -0
  96. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/integration/test_cli.py +0 -0
  97. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/integration/test_client.py +0 -0
  98. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/integration/test_oauth.py +0 -0
  99. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/unit/test_auth.py +0 -0
  100. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/unit/test_build_and_verify.py +0 -0
  101. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/unit/test_builder.py +0 -0
  102. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/unit/test_capabilities.py +0 -0
  103. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/unit/test_conversations.py +0 -0
  104. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/unit/test_daily_transport.py +0 -0
  105. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/unit/test_deployments.py +0 -0
  106. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/unit/test_env.py +0 -0
  107. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/unit/test_guardrail_schema.py +0 -0
  108. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/unit/test_objective_schema.py +0 -0
  109. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/unit/test_pal_schema.py +0 -0
  110. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/unit/test_patch.py +0 -0
  111. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/unit/test_pronunciation_schema.py +0 -0
  112. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/unit/test_release_versions.py +0 -0
  113. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/unit/test_scaffold_embed.py +0 -0
  114. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/unit/test_tool_reuse.py +0 -0
  115. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/tests/unit/test_tool_schema.py +0 -0
  116. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/.dev.vars.example +0 -0
  117. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/src/index.ts +0 -0
  118. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/src/oauth-grant.ts +0 -0
  119. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/src/oauth-session.ts +0 -0
  120. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/src/oauth.ts +0 -0
  121. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/src/slack-link-store.ts +0 -0
  122. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/src/slack.ts +0 -0
  123. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/test/builder-guidance.test.ts +0 -0
  124. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/test/oauth-session.test.ts +0 -0
  125. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/test/parity.test.ts +0 -0
  126. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/test/slack-link.test.ts +0 -0
  127. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/test/tavus.test.ts +0 -0
  128. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/test/worker-runtime.ts +0 -0
  129. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/tsconfig.json +0 -0
  130. {tavus_cli-0.12.0 → tavus_cli-0.13.0}/workers/tavus-mcp/wrangler.jsonc +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.13.0"
3
+ }
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.13.0](https://github.com/Tavus-Engineering/tavus-mcp/compare/v0.12.0...v0.13.0) (2026-10-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * optionally include tool calls in conversation transcripts ([#96](https://github.com/Tavus-Engineering/tavus-mcp/issues/96)) ([a10e799](https://github.com/Tavus-Engineering/tavus-mcp/commit/a10e799c80ddb604ed5d86d44e389808ed821923))
9
+
3
10
  ## [0.12.0](https://github.com/Tavus-Engineering/tavus-mcp/compare/v0.11.0...v0.12.0) (2026-10-27)
4
11
 
5
12
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: tavus-cli
3
- Version: 0.12.0
3
+ Version: 0.13.0
4
4
  Summary: Tavus CLI and MCP server for agentic PAL creation and editing.
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: fastmcp>=2.0.0
@@ -171,6 +171,24 @@ sending the invitation. The PAL needs a default face, or you can supply `face_id
171
171
  Configuration readback and text tests do not prove spoken wake/sleep behavior.
172
172
  Check admission and audio behavior in the live meeting.
173
173
 
174
+ ## Conversation transcripts and tool calls
175
+
176
+ Call `tavus_conversation_get` with `include_tool_calls: true` to retrieve tool
177
+ names, arguments, and IDs alongside the transcript:
178
+
179
+ ```json
180
+ {"conversation_id": "YOUR_CONVERSATION_ID", "include_tool_calls": true}
181
+ ```
182
+
183
+ Assistant entries contain `tool_calls` with each call's `id` and
184
+ `function.name` / `function.arguments`. Tool entries contain the output in
185
+ `content` and identify the call with `tool_call_id`. These fields are returned
186
+ when present in the saved transcript; the tool does not retrieve separate logs.
187
+
188
+ The option defaults to false, preserving the existing role/content response.
189
+ The system prompt stays excluded. Setting `include_transcript: false` returns
190
+ only the summary, even when `include_tool_calls` is true.
191
+
174
192
  ## CLI
175
193
 
176
194
  Install from PyPI, or run without installing:
@@ -149,6 +149,24 @@ sending the invitation. The PAL needs a default face, or you can supply `face_id
149
149
  Configuration readback and text tests do not prove spoken wake/sleep behavior.
150
150
  Check admission and audio behavior in the live meeting.
151
151
 
152
+ ## Conversation transcripts and tool calls
153
+
154
+ Call `tavus_conversation_get` with `include_tool_calls: true` to retrieve tool
155
+ names, arguments, and IDs alongside the transcript:
156
+
157
+ ```json
158
+ {"conversation_id": "YOUR_CONVERSATION_ID", "include_tool_calls": true}
159
+ ```
160
+
161
+ Assistant entries contain `tool_calls` with each call's `id` and
162
+ `function.name` / `function.arguments`. Tool entries contain the output in
163
+ `content` and identify the call with `tool_call_id`. These fields are returned
164
+ when present in the saved transcript; the tool does not retrieve separate logs.
165
+
166
+ The option defaults to false, preserving the existing role/content response.
167
+ The system prompt stays excluded. Setting `include_transcript: false` returns
168
+ only the summary, even when `include_tool_calls` is true.
169
+
152
170
  ## CLI
153
171
 
154
172
  Install from PyPI, or run without installing:
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "tavus"
3
- version = "0.12.0" # x-release-please-version
3
+ version = "0.13.0" # x-release-please-version
4
4
  description = "Official alias for tavus-cli, the Tavus CLI and MCP server."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
7
7
  dependencies = [
8
- "tavus-cli==0.12.0", # x-release-please-version
8
+ "tavus-cli==0.13.0", # x-release-please-version
9
9
  ]
10
10
 
11
11
  [project.urls]
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "tavus-mcp"
3
- version = "0.12.0" # x-release-please-version
3
+ version = "0.13.0" # x-release-please-version
4
4
  description = "Official alias for tavus-cli, which provides the tavus-mcp MCP server."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
7
7
  dependencies = [
8
- "tavus-cli==0.12.0", # x-release-please-version
8
+ "tavus-cli==0.13.0", # x-release-please-version
9
9
  ]
10
10
 
11
11
  [project.urls]
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tavus-cli"
3
- version = "0.12.0"
3
+ version = "0.13.0"
4
4
  description = "Tavus CLI and MCP server for agentic PAL creation and editing."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -1,4 +1,4 @@
1
1
  """Tavus CLI and MCP server package."""
2
2
 
3
3
  __all__ = ["__version__"]
4
- __version__ = "0.12.0" # x-release-please-version
4
+ __version__ = "0.13.0" # x-release-please-version
@@ -33,7 +33,9 @@ def compact_conversation_list(response: Any) -> dict[str, Any]:
33
33
  }
34
34
 
35
35
 
36
- def compact_conversation(response: Any, *, include_transcript: bool = True) -> dict[str, Any]:
36
+ def compact_conversation(
37
+ response: Any, *, include_transcript: bool = True, include_tool_calls: bool = False,
38
+ ) -> dict[str, Any]:
37
39
  item = response if isinstance(response, dict) else {}
38
40
  events = [event for event in item.get("events") or [] if isinstance(event, dict)]
39
41
  result = _summary(item)
@@ -60,7 +62,11 @@ def compact_conversation(response: Any, *, include_transcript: bool = True) -> d
60
62
  raw = props.get("transcript")
61
63
  if isinstance(raw, list):
62
64
  transcript = [
63
- {"role": m.get("role"), "content": m.get("content")}
65
+ {
66
+ "role": m.get("role"), "content": m.get("content"),
67
+ **({key: m[key] for key in ("tool_calls", "tool_call_id") if key in m}
68
+ if include_tool_calls else {}),
69
+ }
64
70
  for m in raw
65
71
  if isinstance(m, dict) and m.get("role") != "system"
66
72
  ]
@@ -1570,13 +1570,20 @@ async def tavus_conversation_list(
1570
1570
 
1571
1571
 
1572
1572
  @mcp.tool()
1573
- async def tavus_conversation_get(conversation_id: str, include_transcript: bool = True) -> Any:
1573
+ async def tavus_conversation_get(
1574
+ conversation_id: str, include_transcript: bool = True, include_tool_calls: bool = False,
1575
+ ) -> Any:
1574
1576
  """Get one conversation: status, why it ended, and the transcript of what
1575
1577
  was said. The PAL's system prompt is left out. Set ``include_transcript`` to
1576
- false for the summary only."""
1578
+ false for the summary only. Set ``include_tool_calls`` to true to also return
1579
+ each tool call's name, arguments, and ID. Tool results appear in entries with
1580
+ role 'tool'. Match each result to its call by tool_call_id. include_tool_calls
1581
+ is ignored when include_transcript is false."""
1577
1582
  async with TavusClient.from_env(surface="mcp") as client:
1578
1583
  response = await client.conversations.get(conversation_id, verbose="true")
1579
- return compact_conversation(response, include_transcript=include_transcript)
1584
+ return compact_conversation(
1585
+ response, include_transcript=include_transcript, include_tool_calls=include_tool_calls,
1586
+ )
1580
1587
 
1581
1588
 
1582
1589
  @mcp.tool()
@@ -513,6 +513,48 @@ def _deployment_env(clean_env: Path) -> None:
513
513
  )
514
514
 
515
515
 
516
+ @pytest.mark.asyncio
517
+ @respx.mock
518
+ @pytest.mark.parametrize("options", [
519
+ {},
520
+ {"include_tool_calls": False},
521
+ {"include_tool_calls": True},
522
+ {"include_tool_calls": True, "include_transcript": False},
523
+ ])
524
+ async def test_conversation_tool_call_transcript_is_opt_in(clean_env: Path, options: dict) -> None:
525
+ _deployment_env(clean_env)
526
+ messages = [
527
+ {"role": "user", "content": "Check my order"},
528
+ {"role": "assistant", "content": "", "tool_calls": [{
529
+ "id": "call-1", "type": "function",
530
+ "function": {"name": "lookup_order", "arguments": '{"order_id":"42"}'},
531
+ }]},
532
+ {"role": "tool", "content": '{"status":"shipped"}', "tool_call_id": "call-1"},
533
+ {"role": "assistant", "content": "Your order shipped."},
534
+ ]
535
+ respx.get("https://api.example.test/v2/conversations/c1", params={"verbose": "true"}).mock(
536
+ return_value=Response(200, json={"conversation_id": "c1", "events": [{
537
+ "event_type": "application.transcription_ready",
538
+ "properties": {"transcript": [
539
+ {"role": "system", "content": "Private instructions"}, *messages,
540
+ ]},
541
+ }]}),
542
+ )
543
+ async with Client(mcp) as client:
544
+ result = await client.call_tool("tavus_conversation_get", {
545
+ "conversation_id": "c1", **options,
546
+ })
547
+ assert result.data["transcript_available"] is True
548
+ if options.get("include_transcript") is False:
549
+ assert "transcript" not in result.data
550
+ elif options.get("include_tool_calls"):
551
+ assert result.data["transcript"] == messages
552
+ else:
553
+ assert result.data["transcript"] == [
554
+ {"role": message["role"], "content": message["content"]} for message in messages
555
+ ]
556
+
557
+
516
558
  @pytest.mark.asyncio
517
559
  async def test_deployment_tools_are_registered_with_annotations() -> None:
518
560
  tools = {tool.name: tool for tool in await mcp.list_tools()}
@@ -1303,7 +1303,7 @@ wheels = [
1303
1303
 
1304
1304
  [[package]]
1305
1305
  name = "tavus-cli"
1306
- version = "0.12.0"
1306
+ version = "0.13.0"
1307
1307
  source = { editable = "." }
1308
1308
  dependencies = [
1309
1309
  { name = "fastmcp" },
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@tavus/tavus-mcp-worker",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@tavus/tavus-mcp-worker",
9
- "version": "0.12.0",
9
+ "version": "0.13.0",
10
10
  "dependencies": {
11
11
  "@modelcontextprotocol/sdk": "^1.29.0",
12
12
  "agents": "^0.12.2",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tavus/tavus-mcp-worker",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1193,14 +1193,19 @@ export function createTavusMcpServer(
1193
1193
 
1194
1194
  server.tool(
1195
1195
  "tavus_conversation_get",
1196
- "Get one conversation: status, why it ended, and the transcript of what was said. The PAL's system prompt is left out. Set include_transcript to false for the summary only.",
1197
- { conversation_id: z.string().min(1), include_transcript: z.boolean().default(true) },
1196
+ "Get one conversation: status, why it ended, and the transcript of what was said. The PAL's system prompt is left out. Set include_transcript to false for the summary only. Set include_tool_calls to true to also return each tool call's name, arguments, and ID. Tool results appear in entries with role 'tool'. Match each result to its call by tool_call_id. include_tool_calls is ignored when include_transcript is false.",
1197
+ {
1198
+ conversation_id: z.string().min(1),
1199
+ include_transcript: z.boolean().default(true),
1200
+ include_tool_calls: z.boolean().default(false),
1201
+ },
1198
1202
  readOnlyAnnotations("Get conversation"),
1199
- async ({ conversation_id, include_transcript }) =>
1203
+ async ({ conversation_id, include_transcript, include_tool_calls }) =>
1200
1204
  toolResult(
1201
1205
  compactConversation(
1202
1206
  await client.get("conversations", conversation_id, { verbose: "true" }),
1203
1207
  include_transcript,
1208
+ include_tool_calls,
1204
1209
  ),
1205
1210
  ),
1206
1211
  );
@@ -4087,7 +4092,9 @@ export function compactConversationList(value: unknown): Record<string, unknown>
4087
4092
  };
4088
4093
  }
4089
4094
 
4090
- export function compactConversation(value: unknown, includeTranscript = true): Record<string, unknown> {
4095
+ export function compactConversation(
4096
+ value: unknown, includeTranscript = true, includeToolCalls = false,
4097
+ ): Record<string, unknown> {
4091
4098
  const item = objectValue(value) ?? {};
4092
4099
  const events = (Array.isArray(item.events) ? item.events : [])
4093
4100
  .map((event) => objectValue(event))
@@ -4115,7 +4122,12 @@ export function compactConversation(value: unknown, includeTranscript = true): R
4115
4122
  transcript = raw
4116
4123
  .map((message) => objectValue(message))
4117
4124
  .filter((message): message is Record<string, unknown> => message !== undefined && message.role !== "system")
4118
- .map((message) => ({ role: message.role ?? null, content: message.content ?? null }));
4125
+ .map((message) => ({
4126
+ role: message.role ?? null,
4127
+ content: message.content ?? null,
4128
+ ...(includeToolCalls && "tool_calls" in message ? { tool_calls: message.tool_calls } : {}),
4129
+ ...(includeToolCalls && "tool_call_id" in message ? { tool_call_id: message.tool_call_id } : {}),
4130
+ }));
4119
4131
  }
4120
4132
  }
4121
4133
  result.transcript_available = transcript !== undefined;
@@ -0,0 +1 @@
1
+ export const VERSION = "0.13.0"; // x-release-please-version
@@ -1,6 +1,8 @@
1
- import { describe, expect, it } from "vitest";
1
+ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
2
+ import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js";
3
+ import { describe, expect, it, vi } from "vitest";
2
4
 
3
- import { compactConversation, compactConversationList } from "../src/tavus";
5
+ import { compactConversation, compactConversationList, createTavusMcpServer } from "../src/tavus";
4
6
 
5
7
  const conversation = {
6
8
  conversation_id: "c1",
@@ -28,6 +30,57 @@ const conversation = {
28
30
  };
29
31
 
30
32
  describe("conversation tools", () => {
33
+ it.each([
34
+ {},
35
+ { include_tool_calls: false },
36
+ { include_tool_calls: true },
37
+ { include_tool_calls: true, include_transcript: false },
38
+ ])("returns tool call details only when requested over MCP: %j", async (options) => {
39
+ const messages = [
40
+ { role: "user", content: "Check my order" },
41
+ { role: "assistant", content: "", tool_calls: [{
42
+ id: "call-1", type: "function",
43
+ function: { name: "lookup_order", arguments: '{"order_id":"42"}' },
44
+ }] },
45
+ { role: "tool", content: '{"status":"shipped"}', tool_call_id: "call-1" },
46
+ { role: "assistant", content: "Your order shipped." },
47
+ ];
48
+ vi.stubGlobal("fetch", vi.fn(async (input: string | URL | Request) => {
49
+ expect(String(input)).toBe("https://api.example.test/v2/conversations/c1?verbose=true");
50
+ return Response.json({ conversation_id: "c1", events: [{
51
+ event_type: "application.transcription_ready",
52
+ properties: { transcript: [{ role: "system", content: "Private instructions" }, ...messages] },
53
+ }] });
54
+ }));
55
+ const server = createTavusMcpServer({
56
+ TAVUS_API_KEY: "test-key", TAVUS_PUBLIC_API_BASE_URL: "https://api.example.test/v2",
57
+ });
58
+ const client = new Client({ name: "conversation-test", version: "1.0.0" });
59
+ const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
60
+ try {
61
+ await server.connect(serverTransport);
62
+ await client.connect(clientTransport);
63
+ const result = await client.callTool({
64
+ name: "tavus_conversation_get", arguments: { conversation_id: "c1", ...options },
65
+ });
66
+ expect(result.isError).not.toBe(true);
67
+ const content = result.content as Array<{ type: string; text: string }>;
68
+ const data = JSON.parse(content[0].text);
69
+ expect(data.transcript_available).toBe(true);
70
+ if (options.include_transcript === false) {
71
+ expect(data).not.toHaveProperty("transcript");
72
+ } else if (options.include_tool_calls) {
73
+ expect(data.transcript).toEqual(messages);
74
+ } else {
75
+ expect(data.transcript).toEqual(messages.map(({ role, content }) => ({ role, content })));
76
+ }
77
+ } finally {
78
+ await client.close();
79
+ await server.close();
80
+ vi.unstubAllGlobals();
81
+ }
82
+ });
83
+
31
84
  it("lists ids and renames persona_id to pal_id", () => {
32
85
  const result = compactConversationList({ data: [conversation], total_count: 118 });
33
86
  expect(result.returned_count).toBe(1);
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.12.0"
3
- }
@@ -1 +0,0 @@
1
- export const VERSION = "0.12.0"; // x-release-please-version
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes