@tencent-rtc/mcp 1.7.5 → 1.7.6

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.
package/server.js CHANGED
@@ -1,47 +1,53 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import { registryTools } from './tools/index.js';
3
3
  const SERVER_INSTRUCTIONS = `
4
- You are using Tencent RTC MCP Server for SDK documentation retrieval.
4
+ You are using Tencent RTC MCP Server for SDK documentation retrieval and integration guidance.
5
5
 
6
- - search_trtc_knowledge: Primary tool for searching Tencent RTC / Chat (IM) / Push (TIMPush) documentation.
7
- Covers: Chat UIKit, CallKit, LiveKit, RoomKit, TRTC Native SDK, WebRTC/rtcEngine, TIMPush.
8
- Use this tool FIRST for technical docs / FAQ / error codes / integration guide lookups.
9
- Do NOT use web_search for questions answerable by this knowledge base.
6
+ Tool routing rules (MUST):
7
+ - search_trtc_knowledge is the default entry for technical consultation: docs lookup, API explanation, error troubleshooting, and integration guidance requests without explicit code generation intent.
8
+ - get_*_integration tools are codegen-only. Call them only when user explicitly asks for runnable project integration code/implementation.
9
+ - present_framework_choice is used only when platform/framework is required but missing.
10
+ - Do not use web_search for questions answerable by this knowledge base.
10
11
 
11
- **Product routing (MUST infer product[] before calling search_trtc_knowledge):**
12
- - TIMPush / push / vendor channel / FCM / APNs / Huawei / Xiaomi / OPPO / vivo -> product=["push"] (independent product; do not misroute to chat)
13
- - conversation / TUIKit / ChatKit / Chat component / theme customization -> ["chat"]
14
- - CallKit / call -> ["call"]; live streaming / voice room / LiveKit -> ["live"]; RoomKit / conference -> ["room"]
12
+ Product routing (MUST infer product[] before calling search_trtc_knowledge):
13
+ - TIMPush / push / vendor channel / FCM / APNs / Huawei / Xiaomi / OPPO / vivo -> ["push"]
14
+ - conversation / TUIKit / ChatKit / chat component / theme customization -> ["chat"]
15
+ - CallKit / call -> ["call"]
16
+ - live streaming / voice room / LiveKit -> ["live"]
17
+ - RoomKit / conference -> ["room"]
15
18
  - TRTC Web SDK / rtcengine / WebRTC plugin -> ["rtcengine"]
16
19
  - TRTCCloud / Native SDK (client side) -> ["native_trtc_sdk"]
17
- - If both push and Chat are involved -> ["push","chat"]
18
- - If product cannot be uniquely inferred from prompt -> ask user to clarify first; do NOT hard-search with empty product; do NOT use web_search.
20
+ - If both push and chat are involved -> ["push","chat"]
21
+ - If product cannot be inferred, ask user to clarify first.
19
22
 
20
- **Frameworks:** If status=needs_framework, MUST call present_framework_choice first. See search_trtc_knowledge tool description decision table.
21
- **When in doubt:** still prefer search_trtc_knowledge with best-guess product; if status is empty or low_confidence, then clarify or retry.
23
+ Framework policy:
24
+ - If search_trtc_knowledge returns status=needs_framework, call present_framework_choice first.
25
+ - For cross-platform product-level topics (pricing, REST API, webhook, console config), framework may be omitted.
22
26
 
23
- **queryID passing rules (hard rule; violation breaks CLS trace continuity):**
24
- - First search_trtc_knowledge call: no queryID required (defaults to empty); response JSON will include server-generated queryID.
25
- - Every subsequent call to search_trtc_knowledge / finalize_answer / submit_feedback: MUST carry the first returned queryID.
26
- - Missing queryID means a brand-new consultation (CLS data cannot be linked).
27
- - For multi-sub-question iterative searches, always reuse the same queryID.
27
+ queryID passing rules (hard rule):
28
+ - First search_trtc_knowledge call: queryID can be empty; server returns a queryID.
29
+ - Every subsequent search_trtc_knowledge / finalize_answer / submit_feedback call in the same consultation MUST reuse that queryID.
30
+ - Missing queryID creates a new consultation and breaks trace continuity.
28
31
 
29
- Workflow:
30
- 1. Call search_trtc_knowledge. Reuse the same queryID for all retries/searches in this consultation.
31
- 2. Draft the complete answer from fragments. Include References from meta.references/doc_urls when available.
32
- 3. MUST call finalize_answer with the same prompt, answer, and queryID before replying.
33
- 4. Reply with that answer + finalize_answer follow-up text.
34
- 5. After finalize_answer follow-up, inspect the next user reply before any normal response. If it means Yes/resolved/thanks/OK, MUST call submit_feedback(resolved="1") before replying. If it means No/unresolved/still not working, MUST call submit_feedback(resolved="0") before replying. Never claim feedback was submitted unless submit_feedback was actually called.
32
+ Consultation workflow (search_trtc_knowledge flow only):
33
+ 1. Call search_trtc_knowledge (reuse same queryID for retries).
34
+ 2. Draft answer from fragments and include references when available.
35
+ 3. MUST call finalize_answer with same prompt, answer, and queryID before replying.
36
+ 4. Reply with finalized answer only.
37
+ 5. If user gives explicit resolved/unresolved feedback after follow-up, MUST call submit_feedback before normal reply.
38
+
39
+ Codegen workflow note:
40
+ - For get_*_integration codegen flow, do NOT call finalize_answer or submit_feedback.
35
41
 
36
42
  User-visible output rules (MUST):
37
- - Internal routing/tool decisions are NEVER user-facing text.
38
- - Before calling any tool, do NOT output prefacing planning text such as “should call... / call ... first / let me search first / this is a consultation task / not codegen”.
39
- - If a tool call is needed, call it directly and then provide user-visible results only.
43
+ - Internal routing/tool decisions are never user-facing text.
44
+ - Do not output planning text like "I should call...", "let me search first", or "this is consultation not codegen".
45
+ - If a tool call is needed, call it directly and then output final actionable content only.
40
46
  `.trim();
41
47
  export function createServer() {
42
48
  const server = new McpServer({
43
- name: "Tencent RTC MCP Server",
44
- version: "1.7.5",
49
+ name: 'Tencent RTC MCP Server',
50
+ version: '1.7.6',
45
51
  }, {
46
52
  instructions: SERVER_INSTRUCTIONS,
47
53
  });
@@ -21,7 +21,7 @@ const registryGetUserSigTool = (mcpServer) => {
21
21
  text: JSON.stringify({
22
22
  error: 'CONFIG_MISSING',
23
23
  message: 'Failed to generate userSig. Reason: SDKAppID or secretKey was not configured via MCP environment variables.',
24
- guide: 'Please guide the user to configure SDKAppID and secretKey according to the tool description (Constraints 2, 3, and 4), specifically by obtaining them from the IM or TRTC Console.'
24
+ guide: 'Please guide the user to configure SDKAppID and secretKey in MCP environment variables, usually obtained from the IM or TRTC Console.'
25
25
  }),
26
26
  }
27
27
  ]
@@ -3,24 +3,30 @@ const TOOL_DESCRIPTION = `
3
3
  Purpose:
4
4
  Return Native TUICallKit preset integration docs for setting up a complete mobile calling experience with a ready-made call UI.
5
5
 
6
- Typical use cases (shared triggers, may also match 'get_native_callkit_core_integration' Core tool):
6
+ When to call (MUST):
7
+ - User explicitly asks for runnable project integration code or concrete implementation steps.
8
+
9
+ When NOT to call:
10
+ - Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
11
+
12
+ Scope details (shared triggers, may also match 'get_native_callkit_core_integration' Core tool):
7
13
  integrate CallKit, set up CallKit, audio/video call, voice call, video call, 1v1 call, group call, calling feature, make a call, answer a call, incoming call, offline push, VoIP
8
- When any of the shared triggers above match, **ask the user first**: "Do you want to integrate with the default call UI (TUICallKit preset), or build a custom call UI on top of the Core SDK?" If the user picks "default / preset", call this tool; if the user picks "custom / Core", call 'get_native_callkit_core_integration'.
14
+ When any of the shared triggers above match, ask user first: "Do you want the default call UI (TUICallKit preset), or a custom call UI on top of the Core SDK?" If user picks default/preset, call this tool; if user picks custom/Core, call 'get_native_callkit_core_integration'.
9
15
 
10
- Typical use cases (preset exclusive triggers, only match this tool, no follow-up question needed):
16
+ Scope details (preset exclusive triggers, only match this tool, no follow-up needed):
11
17
  TUICallKit, Native TUICallKit, Native Call UIKit, preset, preset integration, ready-made UI, default UI, default call UI, out-of-the-box call screen, prebuilt call page, TUICallKit Flutter, TUICallKit Android, TUICallKit iOS
12
18
 
13
- Input:
19
+ Inputs:
14
20
  - framework: flutter | android | ios
15
21
  - prompt: The user's original question in full. Keep the full context. Do not compress it into keywords or a short summary.
16
22
 
17
- Returns:
18
- - content: [{ type: 'text', text: documentation content or explanatory text }]
23
+ Outputs:
24
+ - content: [{ type: 'text', text: Documentation body or explanatory text }]
19
25
 
20
26
  Boundaries:
21
27
  - If the user has not specified a platform or framework, call 'present_framework_choice' first.
22
28
  - When framework=uni-app, this tool is not supported (preset has no uni-app build). Call 'get_native_callkit_core_integration' instead.
23
- - When the user has already indicated "custom UI", "Core SDK", "AtomicXCore", "CallStore", or "build my own call page" or similar Core exclusive triggers, call 'get_native_callkit_core_integration' directly and do not route through this tool.
29
+ - When the user has already indicated "custom UI", "Core SDK", "AtomicXCore", "CallStore", or "build my own call page" or similar Core-exclusive triggers, call 'get_native_callkit_core_integration' directly and do not route through this tool.
24
30
  - This tool is for Native CallKit preset integration. It is not for ringtone, virtual background, avatar, floating window, or other single-feature/API settings.
25
31
  ${INTEGRATION_BOUNDARY_SUFFIX}
26
32
  `;
@@ -1,58 +1,69 @@
1
1
  import { INTEGRATION_BOUNDARY_SUFFIX } from './integration-boundary.js';
2
2
  const TOOL_DESCRIPTION = `
3
3
  Purpose:
4
- Return Native CallKit Core base-integration docs based on the AtomicXCore SDK for developers who want a custom (no preset UI) call screen, covering make-call, answer-call, and offline-push.
4
+ Return Native CallKit Core integration docs for explicit codegen implementation.
5
5
 
6
- Typical use cases (shared triggers, may also match 'get_native_call_uikit_integration' preset tool):
7
- integrate CallKit, set up CallKit, audio/video call, voice call, video call, 1v1 call, group call, calling feature, make a call, answer a call, incoming call, offline push, VoIP
8
- When any of the shared triggers above match, **ask the user first**: "Do you want to integrate with the default call UI (TUICallKit preset), or build a custom call UI on top of the Core SDK?" If the user picks "custom / Core", call this tool; if the user picks "default / preset", call 'get_native_call_uikit_integration'.
6
+ When to call (MUST):
7
+ - User explicitly asks for runnable project integration code or concrete implementation steps.
9
8
 
10
- Typical use cases (Core SDK exclusive triggers, only match this tool, no follow-up question needed):
11
- Core SDK, AtomicXCore, no UI, custom UI, custom call UI, build my own call page, not using the default UI, customize call style, CallStore, CallCoreView, DeviceStore
9
+ When NOT to call:
10
+ - Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
12
11
 
13
- Input:
12
+ Scope details:
13
+ Returns Native CallKit Core integration documentation based on AtomicXCore SDK, for custom calling UI (no preset UI) including call, answer, and offline push flows.
14
+
15
+ Common trigger lexicon (may overlap with 'get_native_call_uikit_integration' preset 工具):
16
+ 集成 CallKit, 接入 CallKit, 音视频通话, 语音通话, 视频通话, 1v1 通话, 多人通话, 通话功能, 拨打电话, 接听电话, 来电, 离线推送, VoIP
17
+ When only common triggers are hit, ask a clarification first: "Do you prefer preset default UI (TUICallKit) or Core SDK custom UI?" Call this tool only after user chooses custom/Core; if user chooses preset/default, call 'get_native_call_uikit_integration'.
18
+
19
+ Core-SDK-only trigger lexicon (direct call, no clarification needed):
20
+ Core SDK, AtomicXCore, 无 UI, 自定义 UI, 自定义通话界面, 自己画通话页面, 不用默认 UI, 修改通话样式, CallStore, CallCoreView, DeviceStore
21
+
22
+ Inputs:
14
23
  - framework: android | ios | flutter | uni-app
15
- - goals: feature module list (make_call | answer_call | offline_push)
16
- - prompt: The user's original question in full. Keep the full context. Do not compress it into keywords or a short summary.
24
+ - goals: Feature module list (make_call | answer_call | offline_push)
25
+ - prompt: Original user question. Keep full context; do not compress into keyword summary.
17
26
 
18
- Returns:
19
- - content: [{ type: 'text', text: documentation content or explanatory text }]
27
+ Outputs:
28
+ - content: [{ type: 'text', text: Documentation body or explanatory text }]
20
29
 
21
30
  Boundaries:
22
- - If the user has not specified a platform or framework, call 'present_framework_choice' first.
23
- - When framework=uni-app, only this tool (Core SDK) is supported; there is no TUICallKit preset path for uni-app. **Do not** ask "default UI vs custom UI" after the user picks uni-app; call this tool directly.
24
- - When framework=uni-app and goals includes offline_push, this tool returns an explanatory fallback message (uni-app Core does not currently ship offline-push integration docs). Guide the user to the Android / iOS offline-push docs and integrate FCM / APNs via uni-app native plugins, or switch to the TUICallKit preset solution.
25
- - This tool covers the core/store-level base-integration main path (CallStore make/answer + offline push). It is not for beauty, virtual background, floating window, or picture-in-picture.
26
- - It returns Core SDK base-integration docs, not a full preset UIKit page template.
31
+ - If platform/framework is not specified, call 'present_framework_choice' first.
32
+ - For framework=uni-app, only this Core tool is supported (no TUICallKit preset path). Do not ask preset vs custom UI again; call this tool directly.
33
+ - If framework=uni-app and goals include offline_push, this tool returns a fallback note (no official uni-app Core offline-push doc yet). Guide user to Android/iOS offline-push docs with native plugin bridging for FCM/APNs, or switch to TUICallKit preset.
34
+ - Focuses on Core/Store-level primary integration path (CallStore call + answer + offline push), not single-feature API tuning such as beauty, virtual background, floating window, or picture-in-picture.
35
+ - Returns Core SDK baseline integration docs, not a complete preset UIKit page template.
27
36
  ${INTEGRATION_BOUNDARY_SUFFIX}
28
37
  `;
29
38
  const PARAMETER_DESCRIPTIONS = {
30
- framework: 'Target platform. The parameter name must be framework. Do not use platform. Allowed values: android | ios | flutter | uni-app. Note: uni-app is only supported by this tool (Core SDK); there is no TUICallKit preset path for uni-app, so do not ask "default UI vs custom UI" when the user picks uni-app.',
31
- goals: 'Feature list. Allowed values: make_call (make a call) | answer_call (answer a call) | offline_push (offline push). Multiple values are allowed, e.g. ["make_call", "answer_call"] for both. Note: when framework=uni-app and goals contains offline_push, this tool returns an explanatory fallback message instead of full docs (uni-app Core does not currently ship an offline-push integration sample).',
32
- prompt: "The user's original question in full. Keep the full context. Do not compress it into keywords or a short summary.",
39
+ framework: 'Target platform. Parameter name must be framework (not platform). Allowed values: android | ios | flutter | uni-app. Note: uni-app supports only this Core tool (no TUICallKit preset path), and no extra preset-vs-custom question is needed.',
40
+ goals: 'Goals list. Allowed values: make_call | answer_call | offline_push. Multi-select is allowed (e.g. ["make_call", "answer_call"]). Note: if framework=uni-app and goals include offline_push, this tool returns fallback guidance instead of full docs (no official uni-app Core offline-push example yet).',
41
+ prompt: 'Original user question. Keep full context; do not compress into keyword summary.',
33
42
  };
34
- const ANTI_HALLUCINATION_HEADER = `This document is based on the AtomicXCore SDK. Do NOT use UI-kit APIs such as TUILogin or TUICallKit.\n\n`;
43
+ const ANTI_HALLUCINATION_HEADER = `This document is based on AtomicXCore SDK. DO NOT use UI-layer APIs such as TUILogin or TUICallKit.\n\n`;
35
44
  const ANTI_HALLUCINATION_CONSTRAINT = `
36
45
  ---
37
46
  [AI Code Generation Constraints - AtomicXCore]
38
- This document uses the AtomicXCore SDK (no-UI integration). Generate code strictly based on the document content. Do NOT introduce any API not mentioned in the document.
47
+ This document describes an AtomicXCore (no-UI) integration path.
48
+ Generate code strictly from documented APIs only, and do NOT introduce undocumented classes or methods.
39
49
 
40
- Principle: If an API or class name never appears in this document, do not use it in the generated code.
50
+ Rule:
51
+ If an API/class name does not appear in this document, do NOT use it in generated code.
41
52
  `;
42
53
  const UNI_APP_OFFLINE_PUSH_FALLBACK = `
43
- # uni-app Core SDK Does Not Yet Provide Offline Push Integration Samples
54
+ # uni-app Core SDK 暂未提供离线推送集成示例
44
55
 
45
- ## Current Status
46
- AtomicXCore for uni-app has not yet released offline push (FCM / APNs) integration docs or sample code.
56
+ ## Current status
57
+ 当前 AtomicXCore for uni-app 尚未发布配套的离线推送(FCM / APNs)集成文档与示例代码。
47
58
 
48
- ## Recommended Approach
49
- - Refer to the Android platform \`callkit/core-sdk/android/offline-push.md\` and integrate FCM Data Messages via the uni-app native Android plugin mechanism.
50
- - Refer to the iOS platform \`callkit/core-sdk/ios/offline-push.md\` and integrate VoIP Push via the uni-app native iOS plugin mechanism.
51
- - If you prefer not to implement native plugins yourself, consider using the \`get_native_call_uikit_integration\` tool to integrate the TUICallKit preset solution, which has built-in offline push support for uni-app.
59
+ ## Recommended approach
60
+ - 参考 Android 平台 \`callkit/core-sdk/android/offline-push.md\`,结合 uni-app 的原生 Android 插件机制接入 FCM Data Message。
61
+ - 参考 iOS 平台 \`callkit/core-sdk/ios/offline-push.md\`,结合 uni-app 的原生 iOS 插件机制接入 VoIP Push。
62
+ - 若不希望自行实现原生插件,建议改用 \`get_native_call_uikit_integration\` 工具集成 TUICallKit preset 方案,该方案 uni-app 端已内置离线推送能力。
52
63
 
53
64
  ## Do NOT
54
- - Do not fabricate uni-app Core offline push code — it may be inconsistent with the official SDK behavior.
55
- - Do not paste Android / iOS offline push code directly into a uni-app project — it requires native plugin bridging.
65
+ - 不要凭空生成 uni-app Core 的离线推送代码,可能与官方 SDK 行为不一致。
66
+ - 不要把 Android / iOS 的离线推送代码原样塞进 uni-app 项目,需要走原生插件桥接。
56
67
  `;
57
68
  export const GET_NATIVE_CALLKIT_CORE_INTEGRATION_DEFINITION = {
58
69
  name: 'get_native_callkit_core_integration',
@@ -3,16 +3,23 @@ const TOOL_DESCRIPTION = `
3
3
  Purpose:
4
4
  Return Native Chat UIKit integration docs for building either a full IM app or a single chat window on mobile.
5
5
 
6
- Typical use cases:
6
+ When to call (MUST):
7
+ - User explicitly asks for runnable project integration code or concrete implementation steps.
8
+
9
+ When NOT to call:
10
+ - Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
11
+
12
+ Scope details:
13
+
7
14
  Native Chat UIKit, TUIKit, IM, chat, conversation list, chat window, Flutter, Android, iOS, full-featured, chat-only, customer service chat, consultation chat
8
15
 
9
- Input:
16
+ Inputs:
10
17
  - framework: flutter | android | ios
11
18
  - goals: [full-featured] | [chat-only]
12
19
  - prompt: The user's original question in full. Keep the full context. Do not compress it into keywords or a short summary.
13
20
 
14
- Returns:
15
- - content: [{ type: 'text', text: documentation content or explanatory text }]
21
+ Outputs:
22
+ - content: [{ type: 'text', text: Documentation body or explanatory text }]
16
23
 
17
24
  Boundaries:
18
25
  - If the user has not specified a platform or framework, call 'present_framework_choice' first.
@@ -1,34 +1,40 @@
1
1
  import { INTEGRATION_BOUNDARY_SUFFIX } from './integration-boundary.js';
2
2
  const TOOL_DESCRIPTION = `
3
3
  Purpose:
4
- Return Native video live streaming integration docs based on TUILiveKit's preset UI components, for AI to complete out-of-the-box mobile (Android / iOS) video live streaming integration and code generation. Covers the live list page (audience entry), host streaming page, and audience watching page — all preset components with complete interactive UI and business logic (e.g. AnchorPrepareView, live list waterfall view, etc.).
4
+ Return Native video live streaming integration docs based on TUILiveKit preset UI components for out-of-the-box Android/iOS integration and code generation.
5
5
 
6
- Typical use cases (shared trigger words, may also match the 'get_native_livekit_core_integration' Core tool):
6
+ When to call (MUST):
7
+ - User explicitly asks for runnable project integration code or concrete implementation steps.
8
+
9
+ When NOT to call:
10
+ - Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
11
+
12
+ Scope details (shared triggers, may also match 'get_native_livekit_core_integration' Core tool):
7
13
  integrate LiveKit, TUILiveKit, video live streaming, live broadcast, host streaming, audience watching, live list, host page, watch page, live room list, Android, iOS
8
- When a shared trigger word is matched, **proactively ask the user first**: "Would you like to quickly integrate with the default live streaming UI (TUILiveKit preset), or build a custom UI on top of Core SDK / AtomicXCore?" Call this tool only after the user chooses "default/preset"; call 'get_native_livekit_core_integration' if they choose "custom/Core".
14
+ When shared triggers match, ask user first: "Do you want the default live UI (TUILiveKit preset), or a custom UI on top of Core SDK/AtomicXCore?" If user chooses default/preset, call this tool; if user chooses custom/Core, call 'get_native_livekit_core_integration'.
9
15
 
10
- Typical use cases (preset-only trigger words, match this tool exclusively, call directly without asking):
11
- TUILiveKit, Native TUILiveKit, Native Live UIKit, preset, preset integration, preset UI, preset host page, preset watch page, preset live list, default live streaming UI, out-of-the-box live streaming UI, ready-made streaming page, already have a live streaming UI, TUILiveKit Android, TUILiveKit iOS, AnchorPrepareView
16
+ Scope details (preset-only triggers, match this tool directly):
17
+ TUILiveKit, Native TUILiveKit, Native Live UIKit, preset, preset integration, preset UI, preset host page, preset watch page, preset live list, default live streaming UI, out-of-the-box live streaming UI, ready-made streaming page, TUILiveKit Android, TUILiveKit iOS, AnchorPrepareView
12
18
 
13
- Input:
19
+ Inputs:
14
20
  - framework: android | ios
15
- - goals: feature module list (multi-select; results are organized in the order live_list → host_streaming → audience_streaming)
21
+ - goals: feature module list (results are organized in order: live_list -> host_streaming -> audience_streaming)
16
22
  - prompt: The user's original question in full. Keep the full context. Do not compress it into keywords or a short summary.
17
23
 
18
- Returns:
19
- - content: [{ type: 'text', text: documentation body (common environment setup / dependency integration for all platforms, plus integration steps and code for the selected feature pages) }]
24
+ Outputs:
25
+ - content: [{ type: 'text', text: Documentation body or explanatory text }]
20
26
 
21
27
  Boundaries:
22
- - This tool is for **video live streaming (live)** scenarios only. Voice room (voice / audio room / seat) is **out of scope** — for that use 'get_native_livekit_core_integration' instead, or inform the user preset UI is not yet supported for voice room
23
- - framework only supports android | ios (TUILiveKit video live streaming preset UI has no flutter / uni-app docs yet — for that use 'get_native_livekit_core_integration' instead, or inform the user it is not supported)
24
- - If the user has not specified a platform, call 'present_framework_choice' first
25
- - If the user has explicitly indicated Core-specific trigger words such as "custom UI", "Core SDK", "AtomicXCore", "LiveCoreView", or "build my own live page", call 'get_native_livekit_core_integration' directly instead of this tool
26
- - Covers full page integration for host streaming / audience watching / live list only. Not responsible for co-guest, PK, gifts, barrage, beauty, or audio effects extensions (use 'search_trtc_knowledge' for those)
28
+ - This tool is for video live streaming scenarios only. Voice room scenarios are out of scope and should use 'get_native_livekit_core_integration'.
29
+ - framework supports android | ios only. For flutter / uni-app, route to 'get_native_livekit_core_integration' or explain unsupported preset path.
30
+ - If the user has not specified a platform, call 'present_framework_choice' first.
31
+ - If the user explicitly indicates Core-specific words such as "custom UI", "Core SDK", "AtomicXCore", "LiveCoreView", or "build my own live page", call 'get_native_livekit_core_integration' directly.
32
+ - Covers host_streaming / audience_streaming / live_list page integration only. For co-guest, PK, gifts, barrage, beauty, or audio effects, use 'search_trtc_knowledge'.
27
33
  ${INTEGRATION_BOUNDARY_SUFFIX}
28
34
  `;
29
35
  const PARAMETER_DESCRIPTIONS = {
30
36
  framework: 'Target platform. The parameter name must be framework. Do not use platform. Allowed values: android | ios.',
31
- goals: 'Feature list (multi-select). Allowed values: live_list (live list page, audience entry) | host_streaming (host streaming page) | audience_streaming (audience watching page). A complete mobile live streaming app usually needs live_list + host_streaming + audience_streaming.',
37
+ goals: 'Feature list (multi-select). Allowed values: live_list (live list page, audience entry) | host_streaming (host streaming page) | audience_streaming (audience watching page). A complete mobile live app usually needs all three.',
32
38
  prompt: "The user's original question in full. Keep the full context. Do not compress it into keywords or a short summary.",
33
39
  };
34
40
  export const GET_NATIVE_LIVE_UIKIT_INTEGRATION_DEFINITION = {
@@ -3,17 +3,24 @@ const TOOL_DESCRIPTION = `
3
3
  Purpose:
4
4
  Return Native LiveKit Core base-integration docs based on AtomicXCore SDK for publishing, viewing, and room-list flows in live streaming or voice room apps.
5
5
 
6
- Typical use cases:
6
+ When to call (MUST):
7
+ - User explicitly asks for runnable project integration code or concrete implementation steps.
8
+
9
+ When NOT to call:
10
+ - Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
11
+
12
+ Scope details:
13
+
7
14
  Native LiveKit Core, AtomicXCore, no-UI SDK, core SDK, live streaming, voice room, publish, watch, room list, Android, iOS, Flutter, live, voice, set up the base live flow, set up the base voice room flow
8
15
 
9
- Input:
16
+ Inputs:
10
17
  - scenario: live | voice
11
18
  - framework: android | ios | flutter
12
19
  - goals: feature module list
13
20
  - prompt: The user's original question in full. Keep the full context. Do not compress it into keywords or a short summary.
14
21
 
15
- Returns:
16
- - content: [{ type: 'text', text: documentation content or explanatory text }]
22
+ Outputs:
23
+ - content: [{ type: 'text', text: Documentation body or explanatory text }]
17
24
 
18
25
  Boundaries:
19
26
  - If the user has not specified a platform or framework, call 'present_framework_choice' first.
@@ -1,26 +1,33 @@
1
1
  const TOOL_DESCRIPTION = `
2
2
  Purpose:
3
- Generate a test userSig from the MCP environment variables SDKAppID and secretKey for local IM or TRTC testing.
3
+ Generate a test userSig using SDKAppID and secretKey from MCP environment variables, for IM/TRTC local debugging.
4
4
 
5
- Typical use cases:
6
- generate a userSig for a specific userID, create a test credential, local debugging credential, userSig for this userID, SDKAppID, secretKey, IM login credential, TRTC login credential
5
+ When to call (MUST):
6
+ - User explicitly asks to generate userSig for a specific userID.
7
+ - User needs a test credential for IM/TRTC local integration debugging.
7
8
 
8
- Input:
9
+ When NOT to call:
10
+ - User asks about userSig principles, production signing architecture, or security design.
11
+ - User does not provide a concrete userID yet.
12
+
13
+ Common trigger lexicon:
14
+ - generate userSig, test credential, local debug credential, userSig for userID, IM login credential, TRTC login credential
15
+
16
+ Inputs:
9
17
  - userID
10
18
 
11
- Returns:
12
- - content: [{ type: 'text', text: userSig result or an error message }]
19
+ Outputs:
20
+ - content: [{ type: 'text', text: userSig result or error details }]
13
21
 
14
22
  Boundaries:
15
- - Use this tool only when the userID is already known and you need a test credential.
16
- - It does not explain userSig principles, issuing flow, or production authentication design.
17
- - It is for development and testing only.
18
- - Production systems should issue userSig from a server.
23
+ - This tool is for test credential generation only.
24
+ - Production should use server-side signing.
25
+ - If required environment variables are missing, return configuration guidance.
19
26
  `;
20
27
  export const GET_USERSIG_DEFINITION = {
21
28
  name: 'get_usersig',
22
29
  description: TOOL_DESCRIPTION,
23
30
  parameter_descriptions: {
24
- userID: 'The userID used to log in to the Tencent Cloud application.',
31
+ userID: 'Target userID for Tencent Cloud app login.',
25
32
  },
26
33
  };
@@ -3,15 +3,22 @@ const TOOL_DESCRIPTION = `
3
3
  Purpose:
4
4
  Return Web TUICallKit preset integration docs for setting up a complete calling experience on PC or H5.
5
5
 
6
- Typical use cases:
6
+ When to call (MUST):
7
+ - User explicitly asks for runnable project integration code or concrete implementation steps.
8
+
9
+ When NOT to call:
10
+ - Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
11
+
12
+ Scope details:
13
+
7
14
  Web Call UIKit, Web TUICallKit, TUICallKit, preset integration, React, Vue, PC, H5, audio/video calling, video call, voice call, integrate CallKit, calling flow, answering flow
8
15
 
9
- Input:
16
+ Inputs:
10
17
  - framework: react | vue
11
18
  - prompt: The user's original question in full. Keep the full context. Do not compress it into keywords or a short summary.
12
19
 
13
- Returns:
14
- - content: [{ type: 'text', text: documentation content or explanatory text }]
20
+ Outputs:
21
+ - content: [{ type: 'text', text: Documentation body or explanatory text }]
15
22
 
16
23
  Boundaries:
17
24
  - If the user has not specified a platform or framework, call 'present_framework_choice' first.
@@ -3,16 +3,23 @@ const TOOL_DESCRIPTION = `
3
3
  Purpose:
4
4
  Return Web Chat UIKit integration docs for building either a full chat app or a single chat window.
5
5
 
6
- Typical use cases:
6
+ When to call (MUST):
7
+ - User explicitly asks for runnable project integration code or concrete implementation steps.
8
+
9
+ When NOT to call:
10
+ - Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
11
+
12
+ Scope details:
13
+
7
14
  Web Chat UIKit, TUIKit, IM, chat, conversation list, chat window, React, Vue, full-featured, chat-only, customer service chat, consultation chat, message entry
8
15
 
9
- Input:
16
+ Inputs:
10
17
  - framework: react | vue
11
18
  - goals: [full-featured] | [chat-only]
12
19
  - prompt: The user's original question in full. Keep the full context. Do not compress it into keywords or a short summary.
13
20
 
14
- Returns:
15
- - content: [{ type: 'text', text: documentation content or explanatory text }]
21
+ Outputs:
22
+ - content: [{ type: 'text', text: Documentation body or explanatory text }]
16
23
 
17
24
  Boundaries:
18
25
  - If the user has not specified a platform or framework, call 'present_framework_choice' first.
@@ -3,15 +3,22 @@ const TOOL_DESCRIPTION = `
3
3
  Purpose:
4
4
  Return Web Live UIKit page-level integration docs for wiring live list, player, publish, and co-guest entry pages.
5
5
 
6
- Typical use cases:
6
+ When to call (MUST):
7
+ - User explicitly asks for runnable project integration code or concrete implementation steps.
8
+
9
+ When NOT to call:
10
+ - Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
11
+
12
+ Scope details:
13
+
7
14
  Web Live UIKit, TUILiveUIKit, Vue, page-level integration, wire the live pages, set up the live list page, set up the player page, set up the publish page, liveList, livePlayer-desk, livePlayer-h5, livePusher
8
15
 
9
- Input:
16
+ Inputs:
10
17
  - goals: feature list
11
18
  - prompt: The user's original question in full. Keep the full context. Do not compress it into keywords or a short summary.
12
19
 
13
- Returns:
14
- - content: [{ type: 'text', text: documentation content or explanatory text }]
20
+ Outputs:
21
+ - content: [{ type: 'text', text: Documentation body or explanatory text }]
15
22
 
16
23
  Boundaries:
17
24
  - This tool is primarily for Web Vue page-level integration. It is not for State API fields/methods or single-component deep dives.
@@ -3,29 +3,32 @@ const TOOL_DESCRIPTION = `
3
3
  Purpose:
4
4
  Return Web RoomKit Atomicx Core integration docs for building a custom meeting room without preset UI, covering login, room state, and device capabilities.
5
5
 
6
- Shared trigger phrases (may also match the preset tool \`get_web_room_uikit_integration\`):
6
+ When to call (MUST):
7
+ - User explicitly asks for runnable project integration code or concrete implementation steps.
8
+
9
+ When NOT to call:
10
+ - Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
11
+
12
+ Scope details (shared triggers, may also match 'get_web_room_uikit_integration' preset tool):
7
13
  Web RoomKit, TUIRoomKit, Atomicx, Vue, integrate RoomKit, meeting room, room, meeting
8
- If the user only hits these shared trigger phrases, ask first:
9
- "Do you want the preset UI for quick integration (TUIRoomUIKit preset), or a custom room built on Atomicx APIs?"
10
- If the user chooses custom / Atomicx / Core, call this tool.
11
- If the user chooses preset / default UI, call \`get_web_room_uikit_integration\`.
14
+ When user only hits shared triggers, ask first: "Do you want the preset UI for quick integration (TUIRoomUIKit), or a custom room built on Atomicx APIs?" If user chooses custom/Atomicx/Core, call this tool. If user chooses preset/default UI, call 'get_web_room_uikit_integration'.
12
15
 
13
- Core-only trigger phrases (call directly, no follow-up needed):
16
+ Scope details (Core-only triggers, call directly):
14
17
  Atomicx API, custom meeting room, custom room UI, without preset UI, useRoomState, useDeviceState, useLoginState, room-state, device-state, device-detection
15
18
 
16
- Input:
19
+ Inputs:
17
20
  - framework: vue
18
21
  - goals: room-state | device-detection | device-state
19
22
  - prompt: The user's original question in full. Keep the full context. Do not compress it into keywords or a short summary.
20
23
 
21
- Returns:
22
- - content: [{ type: 'text', text: documentation content or explanatory text }]
24
+ Outputs:
25
+ - content: [{ type: 'text', text: Documentation body or explanatory text }]
23
26
 
24
27
  Boundaries:
25
- - If the user has not specified a platform or framework, call \`present_framework_choice\` first.
26
- - This is for Atomicx Core integration only (login + room-state / device modules), not preset UI page templates.
27
- - Screen sharing, virtual background, scheduled meeting, and other advanced modules -> call \`search_trtc_knowledge(types=[feature])\`.
28
- - **Login constraint**: MUST call \`get_usersig\` to get a UserSig, then use \`useLoginState.login\`; never implement local UserSig generation such as GenerateTestUserSig inside the project.
28
+ - If the user has not specified a platform or framework, call 'present_framework_choice' first.
29
+ - This is for Atomicx Core integration only (login + room-state/device modules), not preset UI page templates.
30
+ - Screen sharing, virtual background, scheduled meeting, and other advanced modules -> call 'search_trtc_knowledge(types=[feature])'.
31
+ - Login constraint: MUST call 'get_usersig' to get a UserSig, then use useLoginState.login; never implement local UserSig generation such as GenerateTestUserSig inside the project.
29
32
  ${INTEGRATION_BOUNDARY_SUFFIX}
30
33
  `;
31
34
  const PARAMETER_DESCRIPTIONS = {
@@ -3,15 +3,22 @@ const TOOL_DESCRIPTION = `
3
3
  Purpose:
4
4
  Return Web Room UIKit preset integration docs for the main meeting entry page, room page, and default meeting app flow.
5
5
 
6
- Typical use cases:
6
+ When to call (MUST):
7
+ - User explicitly asks for runnable project integration code or concrete implementation steps.
8
+
9
+ When NOT to call:
10
+ - Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
11
+
12
+ Scope details:
13
+
7
14
  Web Room UIKit, TUIRoomUIKit, Atomicx, Vue, preset UI, default meeting app, meeting app, home.vue, room.vue, meeting entry page, meeting room page, H5 meeting, PC meeting, integrate Room UIKit
8
15
 
9
- Input:
16
+ Inputs:
10
17
  - framework: vue
11
18
  - prompt: The user's original question in full. Keep the full context. Do not compress it into keywords or a short summary.
12
19
 
13
- Returns:
14
- - content: [{ type: 'text', text: documentation content or explanatory text }]
20
+ Outputs:
21
+ - content: [{ type: 'text', text: Documentation body or explanatory text }]
15
22
 
16
23
  Boundaries:
17
24
  - This tool is for preset UI integration. It is not for Atomicx API details or custom single-feature modules.
@@ -1,6 +1,10 @@
1
- /** Shared boundary text appended to integration tool descriptions. */
1
+ /** Shared Phase B boundary suffix for all get_* integration tools */
2
2
  export const INTEGRATION_BOUNDARY_SUFFIX = `
3
- - **Codegen only**: Call this tool only when the user explicitly wants integration code added into a project, wants you to implement the integration, or wants generated starter code.
4
- - **Consultation / lookup only** (how it works, what it is, setup steps, troubleshooting, API or component explanations) -> call \`search_trtc_knowledge\`, not this tool.
5
- - This tool belongs to the codegen flow: after answering, do **not** call \`finalize_answer\` or \`submit_feedback\` (those belong only to the \`search_trtc_knowledge\` flow).
6
- - **User-visible output rule (MUST)**: routing/tool choices above are internal only. Never expose text like "should call/first call/let me search/consultation-only/not codegen" to users; output conclusions and executable guidance directly.`;
3
+ - **Codegen only (MUST)**: Call this tool only when user explicitly asks for runnable integration/code implementation (for example: "integrate into my project", "write integration code", "give runnable code").
4
+ - **When NOT to call**: For pure Q&A, documentation lookup, API/component explanation, error troubleshooting, or "I just want to understand the approach first" requests, call \`search_trtc_knowledge\` instead.
5
+ - **Workflow split**: This tool belongs to codegen flow. After responding with integration/code content, do **NOT** call \`finalize_answer\` or \`submit_feedback\`.
6
+ - **User-visible output rule (MUST)**: Tool routing decisions are internal. Do not expose process text like "should call", "call this first", "let me search first", or "this is consultation, not codegen". Output only final actionable content.
7
+ - **Few-shot boundary**:
8
+ - Positive: "Use Vue to integrate Chat UIKit into my existing project and provide runnable code" -> call corresponding \`get_*_integration\`
9
+ - Negative: "What capabilities/components does Chat UIKit provide?" -> call \`search_trtc_knowledge\`
10
+ `;