get_stories
Retrieve active Instagram stories before they expire in 24 hours. Use this tool to access and manage current story content from your account.
Instructions
Get current active stories on your Instagram account. Stories expire after 24 hours.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account_id | No | Instagram account ID (optional) |
Implementation Reference
- src/index.ts:453-456 (handler)MCP tool handler implementation for "get_stories" in src/index.ts
case "get_stories": { const stories = await c.getStories(args.account_id); return JSON.stringify({ stories, count: stories.length }, null, 2); } - src/client.ts:543-549 (handler)Actual implementation of getStories in the client class
async getStories(accountId?: string): Promise<IGStory[]> { const id = accountId ?? this.aid(); const data = await this.request("GET", `${id}/stories`, { params: { fields: "id,media_type,media_url,timestamp" }, }); return data.data ?? []; } - src/index.ts:308-318 (registration)Tool registration definition for "get_stories"
{ name: "get_stories", description: "Get current active stories on your Instagram account. Stories expire after 24 hours.", inputSchema: { type: "object" as const, properties: { account_id: { type: "string", description: "Instagram account ID (optional)" }, }, }, },