Skip to main content
Glama
ascript-cn
by ascript-cn

get_platform_overview

Retrieve API module overview for Android, iOS, or Windows, listing module names, descriptions, classes, and functions.

Instructions

获取指定平台(android/ios/windows)的 API 模块概览,包含模块名、描述、类和函数列表。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
platformYes目标平台:android、ios 或 windows

Implementation Reference

  • The core handler function that executes the tool logic. It loads platform data from JSON, formats an overview with module names, descriptions, classes, and functions.
    def get_platform_overview(self, platform: str) -> str:
        """返回指定平台所有模块的概览信息。
    
        包含每个模块的名称、描述,以及其下主要的类和函数列表。
        """
        self._ensure_loaded()
        platform = platform.strip().lower()
        if platform not in self._data:
            return f"错误:不支持的平台 '{platform}'。支持的平台:{', '.join(VALID_PLATFORMS)}"
    
        modules = self._data[platform].get("modules", [])
        lines: list[str] = [f"# {platform.upper()} 平台 API 概览\n"]
        lines.append(f"共 {len(modules)} 个模块:\n")
    
        for mod in modules:
            module_name = mod["module"]
            docstring = (mod.get("docstring") or "").split("\n")[0]
            lines.append(f"## {module_name}")
            if docstring:
                lines.append(f"  {docstring}")
    
            # 列出类
            classes = mod.get("classes", [])
            if classes:
                cls_names = [c["name"] for c in classes]
                lines.append(f"  类: {', '.join(cls_names)}")
    
            # 列出函数
            functions = mod.get("functions", [])
            if functions:
                func_names = [f["name"] for f in functions]
                lines.append(f"  函数: {', '.join(func_names)}")
    
            lines.append("")
    
        return "\n".join(lines)
  • Tool registration in local.py - defines the tool name, description, and inputSchema for the MCP server (Chinese locale).
    Tool(
        name="get_platform_overview",
        description=(
            "获取指定平台(android/ios/windows)的 API 模块概览,"
            "包含模块名、描述、类和函数列表。"
        ),
        inputSchema={
            "type": "object",
            "properties": {
                "platform": {
                    "type": "string",
                    "description": "目标平台:android、ios 或 windows",
                    "enum": ["android", "ios", "windows"],
                }
            },
            "required": ["platform"],
        },
    ),
  • Tool registration in server.py - defines the tool name, description, and inputSchema for the MCP server (English locale).
    Tool(
        name="get_platform_overview",
        description=(
            "Get an overview of all API modules for a given platform (android/ios/windows). "
            "Returns module names, descriptions, and lists of classes/functions."
        ),
        inputSchema={
            "type": "object",
            "properties": {
                "platform": {
                    "type": "string",
                    "description": "Target platform: 'android', 'ios', or 'windows'",
                    "enum": ["android", "ios", "windows"],
                }
            },
            "required": ["platform"],
        },
    ),
  • Dispatch call in server.py - routes the 'get_platform_overview' tool invocation to api_store.get_platform_overview().
    if name == "get_platform_overview":
        platform = arguments.get("platform", "")
        result = api_store.get_platform_overview(platform)
  • Dispatch call in local.py - routes the 'get_platform_overview' tool invocation to api_store.get_platform_overview().
    if name == "get_platform_overview":
        return api_store.get_platform_overview(args["platform"])
Behavior4/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 reveals the output composition (module names, descriptions, class and function listings) and implies a read-only operation. While it does not mention side effects, authentication, or rate limits, its explicit listing of returned data provides sufficient transparency for a non-destructive tool.

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, front-loaded sentence with no wasted words. It efficiently conveys the tool's action, resource, and output content. Every part of the sentence is necessary.

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 (1 required parameter, no output schema), the description adequately covers the purpose and expected output. It does not explain term 'API 模块概览' in detail, but the context is clear. No pagination or size constraints are mentioned, but these are not critical for this simple overview tool.

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 coverage is 100% (parameter 'platform' has description and enum). The description adds minimal extra meaning beyond the schema, essentially repeating the parameter's allowed values and purpose. Baseline 3 is appropriate as the schema already documents the parameter well.

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

Purpose5/5

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

The description clearly states the verb (获取, get) and resource (指定平台的 API 模块概览, API module overview for specified platform) and specifies the platforms (android/ios/windows) and included content (模块名、描述、类和函数列表). This distinguishes it from sibling tools like get_module_apis which may provide more detail on individual modules.

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 an API module overview for a specific platform, but does not explicitly state when to avoid it or provide alternatives. Given sibling tools like get_module_apis and search_api, the description could offer more guidance on selection, but it is adequate for a straightforward tool.

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/ascript-cn/ascript-mcp'

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