Skip to main content
Glama

apipost_test_connection

Test connection status and verify configuration for the ApiPost MCP server to ensure service availability.

Instructions

测试ApiPost MCP连接状态和配置信息,验证服务可用性

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
random_stringYesDummy parameter for no-parameter tools

Implementation Reference

  • src/index.ts:836-846 (registration)
    Registers the 'apipost_test_connection' tool in the ListTools response, including its name, description, and input schema.
    {
        name: 'apipost_test_connection',
        description: '测试ApiPost MCP连接状态和配置信息,验证服务可用性',
        inputSchema: {
            type: 'object',
            properties: {
                random_string: { type: 'string', description: 'Dummy parameter for no-parameter tools' }
            },
            required: ['random_string']
        }
    },
  • Defines the input schema for the 'apipost_test_connection' tool, requiring a dummy random_string parameter.
    inputSchema: {
        type: 'object',
        properties: {
            random_string: { type: 'string', description: 'Dummy parameter for no-parameter tools' }
        },
        required: ['random_string']
    }
  • The handler for 'apipost_test_connection' that constructs and returns detailed connection status information including workspace, environment, security permissions, and formatted text output.
                case 'apipost_test_connection':
                    const connectionInfo = {
                        status: '✅ 连接正常',
                        mcp_version: '1.0.0',
                        api_host: APIPOST_HOST,
                        security_mode: APIPOST_SECURITY_MODE,
                        workspace: currentWorkspace ? {
                            team_name: currentWorkspace.teamName,
                            project_name: currentWorkspace.projectName,
                            project_id: currentWorkspace.projectId
                        } : null,
                        environment: {
                            token_configured: !!APIPOST_TOKEN,
                            host_configured: !!APIPOST_HOST,
                            node_version: process.version,
                            platform: process.platform,
                            url_prefix: APIPOST_URL_PREFIX
                        },
                        available_operations: {
                            create_api: checkSecurityPermission('write'),
                            update_api: checkSecurityPermission('write'),
                            delete_api: checkSecurityPermission('write'),
                            read_api: checkSecurityPermission('read')
                        },
                        test_time: new Date().toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' })
                    };
                    return {
                        content: [
                            {
                                type: 'text',
                                text: `🎉 ApiPost MCP 连接测试成功!
    
    📊 连接状态: ${connectionInfo.status}
    🔗 MCP版本: ${connectionInfo.mcp_version}
    🌐 API地址: ${connectionInfo.api_host}
    🔒 安全模式: ${connectionInfo.security_mode}
    
    🏢 当前工作空间:
    ${connectionInfo.workspace ? `• 团队: ${connectionInfo.workspace.team_name}
    • 项目: ${connectionInfo.workspace.project_name}
    • 项目ID: ${connectionInfo.workspace.project_id}` : '• 工作空间未初始化'}
    
    🔧 环境配置:
    • Token配置: ${connectionInfo.environment.token_configured ? '✅ 已配置' : '❌ 未配置'}
    • Host配置: ${connectionInfo.environment.host_configured ? '✅ 已配置' : '❌ 未配置'}
    • URL前缀: ${connectionInfo.environment.url_prefix || '(未配置)'}
    • Node版本: ${connectionInfo.environment.node_version}
    • 系统平台: ${connectionInfo.environment.platform}
    
    🛠️ 可用操作:
    • 创建接口: ${connectionInfo.available_operations.create_api ? '✅ 允许' : '❌ 禁止'}
    • 更新接口: ${connectionInfo.available_operations.update_api ? '✅ 允许' : '❌ 禁止'}
    • 删除接口: ${connectionInfo.available_operations.delete_api ? '✅ 允许' : '❌ 禁止'}
    • 读取接口: ${connectionInfo.available_operations.read_api ? '✅ 允许' : '❌ 禁止'}
    
    ⏰ 测试时间: ${connectionInfo.test_time}
    
    🎯 MCP服务器运行正常,可以开始使用其他工具!`
                            }
                        ]
                    };
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. While it states the tool tests connection status and verifies service availability, it doesn't describe what happens during execution (e.g., whether it makes network calls, what authentication is required, what happens on failure, or what the response looks like). For a tool with zero annotation coverage, this is a significant gap in behavioral context.

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 extremely concise - a single sentence in Chinese that efficiently communicates the core purpose. It's front-loaded with the essential information (testing connection status and configuration, verifying availability) with zero wasted words. Every part of the sentence 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 this is a simple connection testing tool with 1 dummy parameter and no output schema, the description is minimally complete. It tells what the tool does but lacks details about what '验证服务可用性' (verify service availability) actually means in practice - what constitutes success/failure, what information is returned, or how it differs from other status-checking tools. The absence of annotations and output schema means more behavioral context would be helpful.

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 input schema has 100% description coverage, with the single parameter 'random_string' documented as 'Dummy parameter for no-parameter tools'. The description doesn't add any parameter information beyond what the schema provides, but since this is essentially a no-parameter tool (the parameter is a dummy), the baseline for 0 meaningful parameters would be 4. The description appropriately doesn't waste space on parameter details.

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: '测试ApiPost MCP连接状态和配置信息,验证服务可用性' (Test ApiPost MCP connection status and configuration information, verify service availability). It specifies the verb ('测试' - test/verify) and resource ('连接状态和配置信息' - connection status and configuration information). However, it doesn't explicitly differentiate from sibling tools like 'apipost_list' or 'apipost_detail' which might also provide status information.

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 minimal usage guidance. It implies this tool should be used to verify service availability, but doesn't specify when to use it versus alternatives like 'apipost_list' (which might list resources) or 'apipost_detail' (which might provide detailed information). No explicit when/when-not guidance or prerequisites are mentioned.

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/jlcodes99/apipost-mcp'

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