Skip to main content
Glama
AceDataCloud

MCP ShortURL

by AceDataCloud

shorturl_get_api_info

Retrieve details about the ShortURL API endpoint, pricing, and service capabilities to understand how to shorten URLs using the AceDataCloud service.

Instructions

Get information about the ShortURL API service.

Returns details about the API endpoint, pricing, and service capabilities.

Returns: API information and service details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main implementation of shorturl_get_api_info tool. This async function returns a formatted string containing comprehensive API information including service details, endpoint information, request/response formats, error codes, and instructions for obtaining API tokens. The tool takes no parameters and is registered with the @mcp.tool() decorator.
    @mcp.tool()
    async def shorturl_get_api_info() -> str:
        """Get information about the ShortURL API service.
    
        Returns details about the API endpoint, pricing, and service capabilities.
    
        Returns:
            API information and service details.
        """
        return """# ShortURL API Information
    
    ## Service Details
    
    | Property     | Value                                  |
    |-------------|----------------------------------------|
    | Service     | Short URL (URL Shortener)              |
    | Endpoint    | POST /shorturl                         |
    | Base URL    | https://api.acedata.cloud              |
    | Pricing     | Free (0 credits per request)           |
    | Auth        | Bearer token required                  |
    | Domain      | Short URLs use surl.id                 |
    | Status      | Production                             |
    
    ## API Endpoint
    
    ```
    POST https://api.acedata.cloud/shorturl
    ```
    
    ### Request Headers
    | Header        | Value                    | Required |
    |---------------|--------------------------|----------|
    | accept        | application/json         | Yes      |
    | authorization | Bearer {your_token}      | Yes      |
    | content-type  | application/json         | Yes      |
    
    ### Request Body
    | Field   | Type   | Description                    | Required |
    |---------|--------|--------------------------------|----------|
    | content | string | The long URL to shorten        | Yes      |
    
    ### Response
    | Field       | Type    | Description                              |
    |-------------|---------|------------------------------------------|
    | success     | boolean | Whether the request was successful       |
    | data.url    | string  | The shortened URL                        |
    
    ## Error Codes
    
    | Code                 | Status | Description                              |
    |---------------------|--------|------------------------------------------|
    | token_mismatched    | 400    | Token does not match the API             |
    | api_not_implemented | 400    | API is not implemented                   |
    | bad_request         | 400    | Invalid request parameters               |
    | no_token            | 400    | No authentication token provided         |
    | disabled            | 400    | Application has been disabled            |
    | invalid_token       | 401    | Invalid or expired token                 |
    | token_expired       | 401    | Authentication token has expired         |
    | used_up             | 403    | Insufficient balance                     |
    | no_api              | 404    | API not found                            |
    | too_many_requests   | 429    | Rate limit exceeded                      |
    | api_error           | 500    | Internal server error                    |
    
    ## Get Your API Token
    
    1. Visit https://platform.acedata.cloud
    2. Sign up or log in
    3. Navigate to Short URL API page
    4. Click "Acquire" to get your token
    """
  • tools/__init__.py:1-10 (registration)
    Registration entry point - imports info_tools module which triggers registration of shorturl_get_api_info with the MCP server through the @mcp.tool() decorator. This ensures the tool is available when the tools module is loaded.
    """Tools module for MCP ShortURL server."""
    
    # Import all tools to register them with the MCP server
    from tools import info_tools, shorturl_tools
    
    __all__ = [
        "shorturl_tools",
        "info_tools",
    ]
  • main.py:110-122 (registration)
    Main application entry point that imports the tools module (including info_tools) and displays shorturl_get_api_info in the list of available tools, confirming successful registration.
    # Import tools and prompts to register them
    safe_print("  Loading tools and prompts...")
    import prompts  # noqa: F401, I001
    import tools  # noqa: F401
    
    safe_print("  [OK] Tools and prompts loaded")
    safe_print("")
    safe_print("  Available tools:")
    safe_print("    - shorturl_create")
    safe_print("    - shorturl_batch_create")
    safe_print("    - shorturl_get_usage_guide")
    safe_print("    - shorturl_get_api_info")
    safe_print("")
  • Documentation helper that describes when to use the shorturl_get_api_info tool - when users ask about API details, pricing, limits, or need error code reference.
    ## API Information
    **Tool:** `shorturl_get_api_info`
    **Use when:**
    - User asks about the ShortURL API details
    - User wants to know about pricing or limits
    - User needs error code reference

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/AceDataCloud/MCPShortURL'

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