Skip to main content
Glama
dorukardahan

twitterapi-docs-mcp

get_twitterapi_guide

Access TwitterAPI.io documentation for pricing, rate limits, authentication, and filter rules. Retrieve full guide content with headers, paragraphs, and code examples.

Instructions

Get TwitterAPI.io guide pages for conceptual topics.

USE THIS WHEN: You need information about pricing, rate limits, authentication, or filter rules. AVAILABLE GUIDES: pricing, qps_limits, tweet_filter_rules, changelog, introduction, authentication, readme

RETURNS: Full guide content with headers, paragraphs, and code examples.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guide_nameYesGuide name: pricing, qps_limits, tweet_filter_rules, changelog, introduction, authentication, readme

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentNo

Implementation Reference

  • Main execution logic for get_twitterapi_guide: validates input, retrieves guide page from data.pages, constructs formatted Markdown response with title, URL, overview, TOC, content sections, key points, code examples, and full raw text.
    case "get_twitterapi_guide": {
      // Validate input
      const validation = validateGuideName(args.guide_name);
      if (!validation.valid) {
        return formatToolError(validation.error);
      }
    
      const page = data.pages?.[validation.value];
    
      if (!page) {
        return formatToolError({
          type: ErrorType.NOT_FOUND,
          message: `Guide "${validation.value}" not found`,
          suggestion: `Available guides: ${Object.keys(data.pages || {}).join(', ')}`,
          retryable: false
        });
      }
    
      let output = `# ${page.title || validation.value}\n\n`;
      output += `**URL:** ${page.url || "N/A"}\n\n`;
    
      if (page.description) {
        output += `## Overview\n${page.description}\n\n`;
      }
    
      if (page.headers?.length > 0) {
        output += `## Table of Contents\n`;
        output += page.headers.map(h => `${"  ".repeat(h.level - 1)}- ${h.text}`).join("\n");
        output += "\n\n";
      }
    
      if (page.paragraphs?.length > 0) {
        output += `## Content\n`;
        output += page.paragraphs.join("\n\n");
        output += "\n\n";
      }
    
      if (page.list_items?.length > 0) {
        output += `## Key Points\n`;
        output += page.list_items.map(li => `- ${li}`).join("\n");
        output += "\n\n";
      }
    
      if (page.code_snippets?.length > 0) {
        output += `## Code Examples\n\`\`\`\n`;
        output += page.code_snippets.join("\n");
        output += "\n```\n\n";
      }
    
      output += `## Full Content\n${page.raw_text || "No additional content."}`;
    
      return formatToolSuccess(output);
    }
  • index.js:1024-1060 (registration)
    Tool registration in ListToolsRequestSchema handler: defines name, description, input schema (guide_name enum), and output schema for structured LLM responses.
          name: "get_twitterapi_guide",
          description: `Get TwitterAPI.io guide pages for conceptual topics.
    
    USE THIS WHEN: You need information about pricing, rate limits, authentication, or filter rules.
    AVAILABLE GUIDES: pricing, qps_limits, tweet_filter_rules, changelog, introduction, authentication, readme
    
    RETURNS: Full guide content with headers, paragraphs, and code examples.`,
          inputSchema: {
            type: "object",
            properties: {
              guide_name: {
                type: "string",
                description: "Guide name: pricing, qps_limits, tweet_filter_rules, changelog, introduction, authentication, readme",
                enum: ["pricing", "qps_limits", "tweet_filter_rules", "changelog", "introduction", "authentication", "readme"]
              },
            },
            required: ["guide_name"],
          },
          outputSchema: {
            type: "object",
            properties: {
              content: {
                type: "array",
                items: {
                  type: "object",
                  properties: {
                    type: { type: "string", enum: ["text"] },
                    text: {
                      type: "string",
                      description: "Markdown with: Title, URL, Overview, Table of Contents, Content paragraphs, Key Points list, Code Examples, Full Content"
                    }
                  }
                }
              }
            }
          }
        },
  • Input/output schemas defining the tool's parameters (guide_name with enum validation) and expected response structure (text content array).
    inputSchema: {
      type: "object",
      properties: {
        guide_name: {
          type: "string",
          description: "Guide name: pricing, qps_limits, tweet_filter_rules, changelog, introduction, authentication, readme",
          enum: ["pricing", "qps_limits", "tweet_filter_rules", "changelog", "introduction", "authentication", "readme"]
        },
      },
      required: ["guide_name"],
    },
    outputSchema: {
      type: "object",
      properties: {
        content: {
          type: "array",
          items: {
            type: "object",
            properties: {
              type: { type: "string", enum: ["text"] },
              text: {
                type: "string",
                description: "Markdown with: Title, URL, Overview, Table of Contents, Content paragraphs, Key Points list, Code Examples, Full Content"
              }
            }
          }
        }
      }
    }
  • Helper function to validate and normalize guide_name input against predefined GUIDE_NAMES list, providing error messages with available options.
    function validateGuideName(name) {
      if (!name || typeof name !== 'string') {
        return {
          valid: false,
          error: {
            type: ErrorType.INPUT_VALIDATION,
            message: 'Guide name cannot be empty',
            suggestion: `Available guides: ${VALIDATION.GUIDE_NAMES.join(', ')}`,
            retryable: false
          }
        };
      }
    
      const trimmed = name.trim().toLowerCase();
    
      if (!VALIDATION.GUIDE_NAMES.includes(trimmed)) {
        return {
          valid: false,
          error: {
            type: ErrorType.INPUT_VALIDATION,
            message: `Unknown guide: "${trimmed}"`,
            suggestion: `Available guides: ${VALIDATION.GUIDE_NAMES.join(', ')}`,
            retryable: false
          }
        };
      }
    
      return { valid: true, value: trimmed };
    }
Behavior3/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 states what the tool returns ('Full guide content with headers, paragraphs, and code examples'), which is helpful. However, it lacks details on potential errors, rate limits, or authentication requirements, which are important for a tool accessing API documentation. The description doesn't contradict any annotations since none exist.

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 well-structured and front-loaded with the core purpose, followed by usage guidelines and available guides. Each sentence serves a clear purpose without redundancy. The bullet-like formatting for 'USE THIS WHEN' and 'AVAILABLE GUIDES' enhances readability, making it efficient for an agent to parse.

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 parameter) and the presence of an output schema (implied by 'Has output schema: true'), the description is reasonably complete. It covers purpose, usage, and return format. However, it could improve by mentioning sibling tools or potential limitations, but the output schema likely handles return values, reducing the need for extensive description.

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?

The input schema has 100% description coverage, with the parameter 'guide_name' fully documented via enum and description. The description adds minimal value beyond the schema by listing the same available guides in the 'AVAILABLE GUIDES' section. This redundancy doesn't provide new semantic insights, so it meets the baseline score of 3 for high schema coverage.

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: 'Get TwitterAPI.io guide pages for conceptual topics.' This specifies the verb ('Get') and resource ('TwitterAPI.io guide pages'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'search_twitterapi_docs' or 'get_twitterapi_endpoint', which might handle similar documentation retrieval in different ways.

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

Usage Guidelines5/5

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

The description provides explicit usage guidance with 'USE THIS WHEN: You need information about pricing, rate limits, authentication, or filter rules.' This clearly defines the context for using this tool. Additionally, it lists 'AVAILABLE GUIDES' to specify the exact topics covered, helping the agent understand when this tool is appropriate versus alternatives.

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/dorukardahan/twitterapi-docs-mcp'

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