@tencent-rtc/mcp 1.7.5 → 1.7.7
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/CHANGELOG.md +15 -0
- package/README.md +60 -52
- package/index.js +23 -1
- package/knowledge/chunker.js +1 -0
- package/knowledge/path-meta.js +12 -1
- package/knowledge/search/search-core.js +22 -4
- package/knowledge/search/search-knowledge.js +1 -1
- package/package.json +1 -1
- package/resource/index/manifest.json +1 -1
- package/server-config.js +20 -6
- package/server.js +35 -29
- package/tools/common/get_usersig.js +1 -1
- package/tools/definitions/get_native_call_uikit_integration_def.js +13 -7
- package/tools/definitions/get_native_callkit_core_integration_def.js +42 -31
- package/tools/definitions/get_native_chat_uikit_integration_def.js +11 -4
- package/tools/definitions/get_native_live_uikit_integration_def.js +21 -15
- package/tools/definitions/get_native_livekit_core_integration_def.js +11 -4
- package/tools/definitions/get_usersig_def.js +18 -11
- package/tools/definitions/get_web_call_uikit_integration_def.js +11 -4
- package/tools/definitions/get_web_chat_uikit_integration_def.js +11 -4
- package/tools/definitions/get_web_live_uikit_integration_def.js +11 -4
- package/tools/definitions/get_web_room_core_integration_def.js +16 -13
- package/tools/definitions/get_web_room_uikit_integration_def.js +11 -4
- package/tools/definitions/integration-boundary.js +9 -5
- package/tools/definitions/present_framework_choice_def.js +20 -20
- package/tools/definitions/search_trtc_knowledge_def.js +47 -27
- package/tools/definitions/submit_feedback_def.js +18 -14
- package/utils/normalize-error.js +13 -0
- package/utils/report-cls-client.js +2 -2
- package/utils/report-es-client.js +1 -1
package/server-config.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { reportESClient } from './utils/report-es-client.js';
|
|
2
|
+
import { reportCLSClient } from './utils/report-cls-client.js';
|
|
2
3
|
import { isValidSDKAppID } from './utils/is-valid-sdkappid.js';
|
|
3
4
|
import { getDeviceIdentifier } from './utils/get-device-identifier.js';
|
|
4
5
|
class ServerConfig {
|
|
@@ -16,17 +17,30 @@ class ServerConfig {
|
|
|
16
17
|
parseEnvConfig() {
|
|
17
18
|
const config = {};
|
|
18
19
|
const { SDKAPPID, SECRETKEY } = process.env || {};
|
|
19
|
-
if (SDKAPPID) {
|
|
20
|
+
if (SDKAPPID && isValidSDKAppID(SDKAPPID)) {
|
|
20
21
|
config.SDKAppID = SDKAPPID;
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
method: 'mcp_config'
|
|
26
|
-
});
|
|
23
|
+
else {
|
|
24
|
+
config.SDKAppID = `${getDeviceIdentifier()}:en`;
|
|
25
|
+
}
|
|
27
26
|
if (SECRETKEY) {
|
|
28
27
|
config.secretKey = SECRETKEY;
|
|
29
28
|
}
|
|
29
|
+
try {
|
|
30
|
+
reportESClient({
|
|
31
|
+
SDKAppID: config.SDKAppID,
|
|
32
|
+
method: 'mcp_config'
|
|
33
|
+
});
|
|
34
|
+
reportCLSClient({
|
|
35
|
+
SDKAppID: config.SDKAppID,
|
|
36
|
+
method: 'mcp_server_config',
|
|
37
|
+
from: 'stdio',
|
|
38
|
+
info: JSON.stringify({
|
|
39
|
+
status: 'success',
|
|
40
|
+
}),
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
catch { }
|
|
30
44
|
return config;
|
|
31
45
|
}
|
|
32
46
|
getConfig() {
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
12
|
-
- TIMPush / push / vendor channel / FCM / APNs / Huawei / Xiaomi / OPPO / vivo ->
|
|
13
|
-
- conversation / TUIKit / ChatKit /
|
|
14
|
-
- CallKit / call -> ["call"]
|
|
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
|
|
18
|
-
- If product cannot be
|
|
20
|
+
- If both push and chat are involved -> ["push","chat"]
|
|
21
|
+
- If product cannot be inferred, ask user to clarify first.
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
24
|
-
- First search_trtc_knowledge call:
|
|
25
|
-
- Every subsequent
|
|
26
|
-
- Missing queryID
|
|
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
|
-
|
|
30
|
-
1. Call search_trtc_knowledge
|
|
31
|
-
2. Draft
|
|
32
|
-
3. MUST call finalize_answer with
|
|
33
|
-
4. Reply with
|
|
34
|
-
5.
|
|
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
|
|
38
|
-
-
|
|
39
|
-
- If a tool call is needed, call it directly and then
|
|
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:
|
|
44
|
-
version:
|
|
49
|
+
name: 'Tencent RTC MCP Server',
|
|
50
|
+
version: '1.7.7',
|
|
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
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
18
|
-
- content: [{ type: 'text', 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
|
|
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
|
|
4
|
+
Return Native CallKit Core integration docs for explicit codegen implementation.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
11
|
-
|
|
9
|
+
When NOT to call:
|
|
10
|
+
- Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
|
|
12
11
|
|
|
13
|
-
|
|
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:
|
|
16
|
-
- prompt:
|
|
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
|
-
|
|
19
|
-
- content: [{ type: 'text', text:
|
|
27
|
+
Outputs:
|
|
28
|
+
- content: [{ type: 'text', text: Documentation body or explanatory text }]
|
|
20
29
|
|
|
21
30
|
Boundaries:
|
|
22
|
-
- If
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
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.
|
|
31
|
-
goals: '
|
|
32
|
-
prompt:
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
54
|
+
# uni-app Core SDK 暂未提供离线推送集成示例
|
|
44
55
|
|
|
45
|
-
## Current
|
|
46
|
-
AtomicXCore for uni-app
|
|
56
|
+
## Current status
|
|
57
|
+
当前 AtomicXCore for uni-app 尚未发布配套的离线推送(FCM / APNs)集成文档与示例代码。
|
|
47
58
|
|
|
48
|
-
## Recommended
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
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
|
-
-
|
|
55
|
-
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
15
|
-
- content: [{ type: 'text', 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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
19
|
+
Inputs:
|
|
14
20
|
- framework: android | ios
|
|
15
|
-
- goals: feature module list (
|
|
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
|
-
|
|
19
|
-
- content: [{ type: 'text', text:
|
|
24
|
+
Outputs:
|
|
25
|
+
- content: [{ type: 'text', text: Documentation body or explanatory text }]
|
|
20
26
|
|
|
21
27
|
Boundaries:
|
|
22
|
-
- This tool is for
|
|
23
|
-
- framework
|
|
24
|
-
- If the user has not specified a platform, call 'present_framework_choice' first
|
|
25
|
-
- If the user
|
|
26
|
-
- Covers
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
16
|
-
- content: [{ type: 'text', 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
|
|
3
|
+
Generate a test userSig using SDKAppID and secretKey from MCP environment variables, for IM/TRTC local debugging.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
|
|
12
|
-
- content: [{ type: 'text', text: userSig result or
|
|
19
|
+
Outputs:
|
|
20
|
+
- content: [{ type: 'text', text: userSig result or error details }]
|
|
13
21
|
|
|
14
22
|
Boundaries:
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
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: '
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
14
|
-
- content: [{ type: 'text', 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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
15
|
-
- content: [{ type: 'text', 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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
14
|
-
- content: [{ type: 'text', 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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
22
|
-
- content: [{ type: 'text', 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
|
|
26
|
-
- This is for Atomicx Core integration only (login + room-state
|
|
27
|
-
- Screen sharing, virtual background, scheduled meeting, and other advanced modules -> call
|
|
28
|
-
-
|
|
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 = {
|