Skip to main content
Glama
spyfree

Mingli MCP Server

by spyfree

list_fortune_systems

Read-onlyIdempotent

Lists available fortune-telling systems like Ziwei Doushu, Bazi, and astrology for Chinese divination analysis through the Mingli MCP Server.

Instructions

列出所有可用的命理系统(紫微斗数、八字、占星等)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
detailedNo是否输出更详细信息

Implementation Reference

  • The _handle_list_systems method implements the core logic of the list_fortune_systems tool, listing all available fortune systems with their capabilities, versions, and optional palace support.
    def _handle_list_systems(self, args: Dict[str, Any]) -> str:
        """工具:列出所有命理系统"""
        from systems import get_system, list_systems
    
        systems = list_systems()
        detailed = bool(args.get("detailed", False))
    
        result = "# 可用的命理系统\n\n"
        for system_name in systems:
            try:
                system = get_system(system_name)
                capabilities = system.get_capabilities()
    
                result += f"## {system.get_system_name()}\n\n"
                result += f"- **版本**: {system.get_system_version()}\n"
                result += f"- **系统ID**: {system_name}\n"
                result += "- **功能支持**:\n"
                for cap_name, cap_value in capabilities.items():
                    status = "✅" if cap_value else "❌"
                    result += f"  - {cap_name}: {status}\n"
    
                if detailed and hasattr(system, "get_supported_palaces"):
                    palaces = system.get_supported_palaces()
                    if palaces:
                        result += f"- **支持宫位**: {', '.join(palaces)}\n"
    
                result += "\n"
            except Exception as e:
                result += f"## {system_name}\n\n"
                result += f"- **状态**: 加载失败 - {str(e)}\n\n"
    
        return result
  • The schema definition for the list_fortune_systems tool, including input schema for optional 'detailed' parameter.
    def get_list_fortune_systems_definition() -> Dict[str, Any]:
        """Get definition for list_fortune_systems tool"""
        return {
            "name": "list_fortune_systems",
            "description": "列出所有可用的命理系统(紫微斗数、八字、占星等)",
            "annotations": {
                "readOnlyHint": True,
                "destructiveHint": False,
                "idempotentHint": True,
            },
            "inputSchema": {
                "type": "object",
                "properties": {
                    "detailed": {
                        "type": "boolean",
                        "description": "是否输出更详细信息",
                        "default": False,
                    }
                },
                "required": [],
                "additionalProperties": False,
            },
        }
  • Registration of the list_fortune_systems tool handler in the ToolRegistry.
    self.register("list_fortune_systems", self._handle_list_systems)
  • Registration of the list_fortune_systems schema in the get_all_tool_definitions function.
    get_list_fortune_systems_definition(),
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the agent knows this is a safe, repeatable read operation. The description adds no behavioral traits beyond this, such as rate limits, authentication needs, or output format details. It doesn't contradict annotations, but adds minimal value given the annotation coverage.

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 in Chinese that directly states the tool's purpose with examples. It is front-loaded with the core action and resource, with no redundant or unnecessary words, making it highly concise and well-structured.

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

Completeness4/5

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

Given the tool's low complexity (one optional parameter), rich annotations covering safety and idempotency, and no output schema, the description is reasonably complete. It clearly states what the tool does, though it could benefit from more usage guidance or output details. For a simple list tool, this is adequate but not exhaustive.

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

Parameters3/5

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

Schema description coverage is 100%, with the parameter 'detailed' fully documented in the schema as a boolean for outputting more information. The description adds no parameter semantics beyond what the schema provides, such as examples of what 'detailed' includes. Baseline 3 is appropriate since the schema handles parameter documentation adequately.

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 the resource '所有可用的命理系统' (all available fortune-telling systems), with examples like '紫微斗数、八字、占星等' (Ziwei Doushu, Bazi, astrology, etc.). It distinguishes from siblings by focusing on listing systems rather than analyzing or getting charts/fortune, though it doesn't explicitly name alternatives. This is specific but lacks explicit sibling differentiation.

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

Usage Guidelines3/5

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

The description implies usage when needing to see available systems, but provides no explicit guidance on when to use this tool versus alternatives like 'analyze_bazi_element' or 'get_ziwei_chart'. It doesn't state prerequisites, exclusions, or named alternatives, leaving usage context inferred rather than clearly defined.

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/spyfree/mingli-mcp'

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