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

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,
    )

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