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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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",
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'step-by-step exploration' and drilling down, which hints at iterative use, but doesn't cover critical aspects like whether this is a read-only operation, potential rate limits, authentication needs, or what happens with invalid inputs. For a tool with 7 parameters and no annotations, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by a brief explanation of usage. Every sentence adds value without redundancy, making it efficient and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (7 parameters, no annotations, but with an output schema), the description is incomplete. It covers the purpose and basic usage but lacks details on parameter meanings and behavioral traits. The output schema helps by documenting return values, but the description doesn't fully address the gaps in parameter semantics and transparency, making it only minimally adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning none of the 7 parameters are documented in the schema. The description only mentions 'path' and implies its usage for exploration, but doesn't explain other parameters like conf_id, system_config, include_value, max_children, redact_secrets, or max_string_length. This fails to compensate for the low coverage, leaving most parameters semantically unclear.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Inspect a node in an AstrBot config JSON.' It specifies the verb ('inspect') and resource ('node in an AstrBot config JSON'), making it distinct from siblings like list_astrbot_config_files or search_astrbot_config_paths. However, it doesn't explicitly differentiate from all siblings, such as get_astrbot_logs, which might also involve inspection but of logs rather than configs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for usage: 'This tool is designed for step-by-step exploration' with examples like starting with path=None and drilling down. This implies when to use it (for exploration) but doesn't explicitly state when not to use it or name alternatives like list_astrbot_config_files for listing files instead of inspecting nodes. The guidance is helpful but lacks explicit exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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