Skip to main content
Glama

list_astrbot_config_files

Retrieve configuration files for AstrBot to manage settings and customize bot behavior.

Instructions

List AstrBot config files (abconfs), via /api/config/abconfs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function implementing the 'list_astrbot_config_files' tool. It uses AstrBotClient to fetch the list of config files (abconfs) from the AstrBot API endpoint /api/config/abconfs, handling errors and formatting the response.
    async def list_astrbot_config_files() -> Dict[str, Any]:
        """
        List AstrBot config files (abconfs), via /api/config/abconfs.
        """
        client = AstrBotClient.from_env()
        try:
            result = await client.get_abconf_list()
        except Exception as e:
            return {
                "status": "error",
                "message": f"AstrBot API error: {e.response.status_code if hasattr(e, 'response') else 'Unknown'}",
                "base_url": client.base_url,
                "detail": _httpx_error_detail(e),
            }
    
        status = result.get("status")
        if status != "ok":
            return {"status": status, "message": result.get("message"), "raw": result}
    
        return {"info_list": (result.get("data") or {}).get("info_list", [])}
  • Registers the tool function with the FastMCP server instance, making it available via the MCP protocol under the name 'list_astrbot_config_files'.
    server.tool(astrbot_tools.list_astrbot_config_files, name="list_astrbot_config_files")
  • Imports and re-exports the list_astrbot_config_files function from config_tools.py, making it available as astrbot_tools.list_astrbot_config_files for use in server.py.
    from .config_tools import (
        list_astrbot_config_files,
        inspect_astrbot_config,
        apply_astrbot_config_ops,
    )
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 states the action ('List') and API endpoint, but lacks details on permissions, rate limits, pagination, or response format. For a read operation with zero annotation coverage, this is a significant gap in transparency.

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 a single, efficient sentence that front-loads the core purpose ('List AstrBot config files (abconfs)') and includes the API endpoint as supplementary detail. There is zero waste, and every word earns its place.

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 simplicity (0 parameters, read-only list operation) and the presence of an output schema, the description is minimally adequate. However, it lacks context on behavioral aspects like permissions or pagination, and no annotations compensate. For a tool with siblings, more guidance would improve completeness.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description correctly omits parameter details, aligning with the schema. A baseline of 4 is appropriate as it avoids redundancy, though it doesn't add value beyond the schema.

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 verb ('List') and resource ('AstrBot config files (abconfs)'), making the purpose unambiguous. It distinguishes from siblings like 'inspect_astrbot_config' (which inspects rather than lists) and 'search_astrbot_config_paths' (which searches paths rather than listing files). However, it doesn't specify if this lists all files or has implicit filters, preventing a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'search_astrbot_config_paths' or 'inspect_astrbot_config'. It mentions the API endpoint ('/api/config/abconfs'), but this is technical detail rather than usage context. No exclusions, prerequisites, or comparative advice are included.

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