Skip to main content
Glama

example_tool

Perform Instagram operations through the Insta MCP Server to interact with Instagram features using the Model Context Protocol.

Instructions

Example tool template for Instagram operations

Input Schema

NameRequiredDescriptionDefault
param1YesExample parameter

Input Schema (JSON Schema)

{ "properties": { "param1": { "description": "Example parameter", "type": "string" } }, "required": [ "param1" ], "type": "object" }

Implementation Reference

  • The `execute` method of `ExampleTool` class implements the core logic for the 'example_tool'. It validates the IGPAPI client initialization, accesses the client, and returns a sample result based on the input parameter.
    async execute(args: { param1: string }): Promise<ToolResult> { // Ensure IGPAPI client is initialized if (!igpapiClient.isInitialized()) { throw new Error("IGPAPI client not initialized"); } const client = igpapiClient.getClient(); // TODO: Implement tool logic using IGPAPI client // Example: // const result = await client.someMethod(args.param1); return { content: [ { type: "text", text: `Example tool executed with param1: ${args.param1}`, }, ], }; }
  • The `getDefinition` method defines the tool's metadata including name 'example_tool', description, and input schema requiring a 'param1' string parameter.
    getDefinition(): ToolDefinition { return { name: "example_tool", description: "Example tool template for Instagram operations", inputSchema: { type: "object", properties: { param1: { type: "string", description: "Example parameter", }, }, required: ["param1"], }, }; }
  • Import statement for the ExampleTool class in the tools index file, which is used for tool registry and making it available for instantiation and registration.
    import { BaseTool } from "./base.js";

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/anand-kamble/mcp-instagram'

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