Skip to main content
Glama

shorturl_get_usage_guide

Learn how to use ShortURL tools effectively with this guide covering parameters, examples, and best practices for URL shortening.

Instructions

Get a comprehensive guide for using the ShortURL tools.

Provides detailed information on how to use the ShortURL tools
effectively, including parameters, examples, and best practices.

Returns:
    Complete usage guide for ShortURL tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual handler function for the shorturl_get_usage_guide tool. Decorated with @mcp.tool(), returns a comprehensive markdown usage guide string about all available ShortURL tools, example usage, response structure, and notes.
    @mcp.tool()
    async def shorturl_get_usage_guide() -> str:
        """Get a comprehensive guide for using the ShortURL tools.
    
        Provides detailed information on how to use the ShortURL tools
        effectively, including parameters, examples, and best practices.
    
        Returns:
            Complete usage guide for ShortURL tools.
        """
        # Last updated: 2026-04-05
        return """# ShortURL Tools Usage Guide
    
    ## Available Tools
    
    ### URL Shortening
    **shorturl_create** - Shorten a single URL
    - url: The long URL to shorten (required, must start with http:// or https://)
    
    **shorturl_batch_create** - Shorten multiple URLs at once
    - urls: List of long URLs to shorten (max 10 per batch)
    
    ## Example Usage
    
    ### Shorten a Single URL
    ```
    shorturl_create(url="https://platform.acedata.cloud/documents/a2303356-6672-4eb8-9778-75f55c998fe9")
    ```
    
    **Response:**
    ```json
    {
      "success": true,
      "data": {
        "url": "https://surl.id/1uHCs01xa5"
      }
    }
    ```
    
    ### Batch Shorten Multiple URLs
    ```
    shorturl_batch_create(urls=[
        "https://example.com/very-long-url-1",
        "https://example.com/very-long-url-2"
    ])
    ```
    
    ## Response Structure
    
    ### Successful Response
    - **success**: `true` - indicates the request was successful
    - **data.url**: The shortened URL (e.g., `https://surl.id/abc123`)
    
    ### Error Response
    - **success**: `false` - indicates an error occurred
    - **error.code**: Error code (e.g., `api_error`, `bad_request`)
    - **error.message**: Human-readable error description
    - **trace_id**: Request trace ID for debugging
    
    ## Notes
    - The service is **free** (0 credits per request)
    - Short URLs use the `surl.id` domain
    - Short URLs are permanent and redirect to the original URL
    - Only valid HTTP/HTTPS URLs can be shortened
    - Rate limiting applies to prevent abuse
    """
  • Registration via @mcp.tool() decorator on the async function shorturl_get_usage_guide. The tools/__init__.py imports info_tools which triggers the registration when tools module is loaded in main.py.
    @mcp.tool()
    async def shorturl_get_usage_guide() -> str:
  • main.py:118-120 (registration)
    The tool is listed in the server startup banner showing available tools.
    safe_print("    - shorturl_create")
    safe_print("    - shorturl_batch_create")
    safe_print("    - shorturl_get_usage_guide")
  • main.py:166-169 (registration)
    The tool is registered in the MCP Server Card (for HTTP transport) listing available tools.
    {
        "name": "shorturl_get_usage_guide",
        "description": "Get API usage guide",
    },
Behavior4/5

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

With no annotations, the description carries full burden. It transparently states the tool returns a guide with usage details. No side effects are mentioned, but for a read-only retrieval tool, this is sufficient.

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 with four efficient sentences. The main action 'Get a comprehensive guide' is front-loaded. Every sentence adds value without redundancy.

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

Completeness5/5

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

Given zero parameters and an output schema, the description fully covers the tool's purpose and return value. It is complete for a simple guide retrieval tool.

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 zero parameters with 100% coverage. Per guidelines, 0 parameters yields baseline 4. The description adds no parameter details, but none are needed.

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 tool provides a comprehensive guide for using ShortURL tools, including parameters, examples, and best practices. It distinguishes itself from sibling tools like shorturl_create and shorturl_get_api_info by focusing on usage guidance rather than action or API info.

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

Usage Guidelines4/5

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

The description implies use when needing to understand ShortURL tools effectively, but lacks explicit when-not-to-use or alternative suggestions. The context is clear for a guide tool, but could explicitly differentiate from shorturl_get_api_info.

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

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