Skip to main content
Glama
olamide-olaniyan

SociaVault MCP Server

get_instagram_posts

Retrieve Instagram posts from a specified user to analyze content, track updates, or gather social media data for research and monitoring purposes.

Instructions

Get Instagram posts from a user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
handleYesInstagram username

Implementation Reference

  • Handler logic for get_instagram_posts tool: extracts handle from args, calls Sociavault API /instagram/posts endpoint, uses extractInstagramPosts helper to process response, returns JSON with posts data.
    if (name === "get_instagram_posts") {
      const { handle } = args as { handle: string };
      const response = await axios.get(`${BASE_URL}/instagram/posts`, {
        headers: { "X-API-Key": API_KEY },
        params: { handle },
      });
      const extracted = extractInstagramPosts(response.data, 10);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              { handle, posts: extracted, total_returned: extracted.length },
              null,
              2
            ),
          },
        ],
      };
    }
  • src/index.ts:256-266 (registration)
    Tool registration in the tools array: defines name, description, and inputSchema for get_instagram_posts.
    {
      name: "get_instagram_posts",
      description: "Get Instagram posts from a user",
      inputSchema: {
        type: "object",
        properties: {
          handle: { type: "string", description: "Instagram username" },
        },
        required: ["handle"],
      },
    },
  • Input schema definition for get_instagram_posts tool: requires 'handle' string parameter.
    inputSchema: {
      type: "object",
      properties: {
        handle: { type: "string", description: "Instagram username" },
      },
      required: ["handle"],
    },
  • Helper function to extract and format up to 10 Instagram posts from API response data.
    function extractInstagramPosts(data: any, limit = 10) {
      const edges = data?.data?.edges || data?.edges || [];
      return edges.slice(0, limit).map((edge: any) => {
        const node = edge.node;
        return {
          shortcode: node.shortcode,
          caption: node.edge_media_to_caption?.edges?.[0]?.node?.text || "",
          likes:
            node.edge_liked_by?.count || node.edge_media_preview_like?.count || 0,
          comments: node.edge_media_to_comment?.count || 0,
          timestamp: node.taken_at_timestamp,
          is_video: node.is_video,
          display_url: node.display_url,
        };
      });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It states what the tool does ('Get Instagram posts') but doesn't describe how it behaves—e.g., whether it requires authentication, has rate limits, returns recent or all posts, includes metadata, or handles errors. This leaves significant gaps for a tool that likely interacts with an external API.

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 and front-loaded with a single, clear sentence that directly states the tool's function. There is no wasted language or unnecessary elaboration, making it efficient and easy to parse, though this conciseness comes at the cost of completeness in other dimensions.

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

Completeness2/5

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

Given the complexity of interacting with Instagram's API (implied by the tool's function) and the lack of annotations and output schema, the description is incomplete. It doesn't address behavioral aspects like authentication needs, rate limits, or return format, which are critical for effective tool use. The description alone is insufficient for an agent to understand the full context of invoking this 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?

The description adds no parameter-specific information beyond what the input schema provides. Since schema description coverage is 100% (the 'handle' parameter is documented as 'Instagram username'), the baseline score of 3 applies. The description doesn't elaborate on parameter usage, such as format requirements or examples, but the schema adequately covers the essentials.

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 with a specific verb ('Get') and resource ('Instagram posts from a user'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_instagram_profile' or 'get_threads_posts', which would require mentioning it retrieves posts specifically rather than profile information or content from other platforms.

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 no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_instagram_profile' for profile data instead of posts, or 'get_threads_posts' for similar content from a different platform. There are no explicit when/when-not instructions or prerequisites, leaving usage context implied at best.

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/olamide-olaniyan/sociavault-mcp'

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