Skip to main content
Glama

get_session_info

Retrieve detailed information about a specific serial port session by providing its session ID, such as /dev/ttyUSB0 or COM1, to monitor connection status and parameters.

Instructions

获取指定终端会话的详细信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes会话ID(即串口路径),如 /dev/ttyUSB0 或 COM1

Implementation Reference

  • The handler function that implements the core logic of the 'get_session_info' tool by calling the terminal manager's get_session_info method.
    def get_session_info(session_id: str) -> dict[str, Any]: """获取会话详细信息 Args: session_id: 会话ID(串口路径) Returns: 会话信息 """ manager = get_terminal_manager() return manager.get_session_info(session_id)
  • The input schema definition for the 'get_session_info' tool used in MCP registration.
    GET_SESSION_INFO_TOOL: dict[str, Any] = { "name": "get_session_info", "description": "获取指定终端会话的详细信息", "inputSchema": { "type": "object", "properties": { "session_id": { "type": "string", "description": "会话ID(即串口路径),如 /dev/ttyUSB0 或 COM1", }, }, "required": ["session_id"], }, }
  • Registration of the 'get_session_info' tool in the MCP server's list_tools handler.
    types.Tool( name=GET_SESSION_INFO_TOOL["name"], description=GET_SESSION_INFO_TOOL["description"], inputSchema=GET_SESSION_INFO_TOOL["inputSchema"], ),
  • Dispatch to the 'get_session_info' handler in the MCP server's call_tool method.
    elif name == "get_session_info": result = get_session_info(**arguments)
  • No, wrong. Wait, helper is the manager call, but to fix.
    CLEAR_BUFFER_TOOL: dict[str, Any] = { "name": "clear_buffer", "description": "清空指定终端会话的输出缓冲区", "inputSchema": { "type": "object", "properties": { "session_id": { "type": "string", "description": "会话ID(即串口路径),如 /dev/ttyUSB0 或 COM1", }, }, "required": ["session_id"], }, }

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/donnel666/uart-mcp'

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