Skip to main content
Glama
Tencent-RTC

Tencent RTC MCP Server

Official
by Tencent-RTC

get_web_live_state_detail

Retrieve detailed documentation and usage examples for the state API in Tencent RTC's web live streaming TUIKit components to implement real-time communication features.

Instructions

This is a tool specifically designed to provide the State API for the TUIKit component in web live streaming. Users can call this tool when they need to use the State API. The tool provides the following: | 这是一个专门负责提供 web 直播 TUIKit 组件 State API 的工具,当用户需要使用 State API 时可以调用工具,工具提供以下内容:

  1. Web Live TUIKit State provides instructions and examples for using the state API. | 1. web Live TUIKit State 提供了 state API 的使用说明和示例。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
frameworkYesWeb Live UIKit component state API details framework type, currently supported frameworks are: vue | Web Room uikit 组件详情框架类型,目前支持的框架有:vue
componentNameYesThe specific component name of the web live UIKit component, such as live-state | Web Live uikit 组件的具体 state 名称,比如 live-state

Implementation Reference

  • The MCP tool handler function that returns a text content response by invoking the getResultText helper with the input parameters.
    }, (params) => ({
        content: [
            {
                type: 'text',
                text: getResultText(params),
            }
        ]
    }));
  • Zod schema defining the input parameters: framework (enum: 'vue') and componentName (string).
    framework: z.enum(['vue']).describe('Web Live UIKit component state API details framework type, currently supported frameworks are: vue | Web Room uikit 组件详情框架类型,目前支持的框架有:vue'),
    componentName: z.string().describe('The specific component name of the web live UIKit component, such as live-state | Web Live uikit 组件的具体 state 名称,比如 live-state'),
  • Function that registers the 'get_web_live_state_detail' tool with the MCP server, including name, description, schema, and handler.
    const registerGetWebLiveStateDetailTool = (mcpServer) => {
        mcpServer.tool('get_web_live_state_detail', description, {
            framework: z.enum(['vue']).describe('Web Live UIKit component state API details framework type, currently supported frameworks are: vue | Web Room uikit 组件详情框架类型,目前支持的框架有:vue'),
            componentName: z.string().describe('The specific component name of the web live UIKit component, such as live-state | Web Live uikit 组件的具体 state 名称,比如 live-state'),
        }, (params) => ({
            content: [
                {
                    type: 'text',
                    text: getResultText(params),
                }
            ]
        }));
    };
  • Helper function that logs usage via aegisClient and retrieves documentation content using getDocContent based on framework and componentName.
    function getResultText(params) {
        const { framework, componentName = '' } = params;
        aegisClient.report({
            name: 'get_web_live_state_detail',
            ext1: componentName,
            ext2: framework,
            from: 'en',
        });
        return getDocContent(['livekit', `${handleFramework(framework)}`, 'states', `${handleStateName(componentName)}.md`]);
    }
  • tools/index.js:24-51 (registration)
    Top-level import and invocation of the tool registration within the main registryTools function.
    import { registerGetWebLiveStateDetailTool } from './live/get-web-live-state-detail.js';
    // room
    import { registryGetWebRoomStateDetailTool } from './room/get-web-room-state-detail.js';
    function registryTools(mcpServer) {
        // common
        registryPresentFrameworkChoiceTool(mcpServer);
        registryRecordPromptTool(mcpServer);
        registryRecordResultTool(mcpServer);
        registryGetUserSigTool(mcpServer);
        // chat
        registryGetWebChatIntegrationTool(mcpServer);
        registryGetWebChatWindowIntegrationTool(mcpServer);
        registryGetWebChatComponentDetailTool(mcpServer);
        registryGetWebChatInitTool(mcpServer);
        //registryGetWebCreateGroupTool(mcpServer);
        registryGetNativeChatIntegrationTool(mcpServer);
        registryGetChatFaqTool(mcpServer);
        // call
        registryGetWebCallIntegrationTool(mcpServer);
        registryGetNativeCallIntegrationTool(mcpServer);
        registryGetCallFaqTool(mcpServer);
        // rtcengine
        registryGetTRTCWebSDKFaqTool(mcpServer);
        registryGetRTCEngineWebSDKIntegrationGuideTool(mcpServer);
        registryGetTRTCWebSDKIntegrationGuideTool(mcpServer);
        // live
        registryGetWebLiveComponentDetailTool(mcpServer);
        registerGetWebLiveStateDetailTool(mcpServer);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tencent-RTC/mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server