Skip to main content
Glama

inspect_astrbot_config

Explore and analyze AstrBot configuration JSON structure step-by-step to inspect nodes, list keys, and drill down into specific paths for debugging and management.

Instructions

Inspect a node in an AstrBot config JSON.

This tool is designed for step-by-step exploration:

  • Start with path=None to list top-level keys.

  • Then drill down by providing a deeper path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conf_idYes
system_configYes
pathYes
include_valueYes
max_childrenYes
redact_secretsYes
max_string_lengthYes

Implementation Reference

  • Core handler function that executes the inspect_astrbot_config tool: connects to AstrBot, fetches config, navigates path, summarizes node with configurable options.
    async def inspect_astrbot_config( *, conf_id: str | None = None, system_config: bool = False, path: str | List[Any] | None = None, include_value: bool = False, max_children: int = 50, redact_secrets: bool = True, max_string_length: int = 200, ) -> Dict[str, Any]: """ Inspect a node in an AstrBot config JSON. This tool is designed for step-by-step exploration: - Start with path=None to list top-level keys. - Then drill down by providing a deeper path. """ client = AstrBotClient.from_env() if system_config and conf_id: return {"status": "error", "message": "Do not pass conf_id when system_config=true"} if not system_config and not conf_id: return {"status": "error", "message": "conf_id is required unless system_config=true"} try: api_result = await client.get_abconf(conf_id=conf_id, system_config=system_config) except Exception as e: return { "status": "error", "message": _astrbot_connect_hint(client), "base_url": client.base_url, "detail": _httpx_error_detail(e), } status = api_result.get("status") if status != "ok": return {"status": status, "message": api_result.get("message"), "raw": api_result} config = (api_result.get("data") or {}).get("config") if not isinstance(config, dict): return {"status": "error", "message": "AstrBot returned invalid config payload", "raw": api_result} try: path_segments = _parse_path(path) node = _get_node(config, path_segments) leaf_name = None if path_segments and isinstance(path_segments[-1], str): leaf_name = path_segments[-1] summary = _summarize_node( node, max_children=max_children, include_value=include_value, redact_secrets=redact_secrets, leaf_name=leaf_name, max_string_length=max_string_length, ) return { "conf_id": conf_id, "system_config": system_config, "path": path_segments, "node": summary, } except Exception as e: return { "status": "error", "message": str(e), "conf_id": conf_id, "system_config": system_config, "path": path, }
  • Registers the inspect_astrbot_config tool function with the FastMCP server instance, making it available via MCP.
    server.tool(astrbot_tools.inspect_astrbot_config, name="inspect_astrbot_config")
  • Imports and re-exports the inspect_astrbot_config function from config_tools.py into the tools package for use by server.py.
    from .config_tools import ( list_astrbot_config_files, inspect_astrbot_config, apply_astrbot_config_ops, )
  • Lists the tool in the astrbot://info resource for discovery by MCP hosts.
    "inspect_astrbot_config",

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/xunxiing/astrbotmcp'

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