Open Instagram API
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| IGDM_API | No | Address of the Open Instagram API server (default http://127.0.0.1:8765) | |
| IGDM_TOKEN | No | API token (default: the api_token file created by server.py) |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Tools for one Instagram account, through a self-hosted Open Instagram API server. Chats are identified by thread_id (the thread_fbid from list_threads); posts and reels by shortcode (the code field in results, or the part after /p/ or /reel/ in a URL). Paged results return next_cursor: pass it back as cursor for more. Ask the user before anything that sends messages, posts, comments, follows or changes the profile: it acts as them, and publishing can't be undone through the API. Keep the pace human; Instagram restricts accounts that behave like bots.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_threadsA | List DM chats (newest first). folder="requests" lists message requests from people you don't follow. |
| unread_threadsA | Chats whose newest message wasn't sent by you, i.e. ones waiting for a reply (inbox and requests). |
| read_messagesA | Read the newest messages of a chat (about 20). Pass next_cursor as cursor for older ones. |
| send_messageB | Send a text message to a chat, optionally as a reply to one of its messages. |
| send_photoB | Send an image file (path on this machine) to a chat. |
| unsend_messageB | Unsend (delete for everyone) one of your own messages. |
| react_to_messageB | React to a message with an emoji, or remove your reaction (remove=True). |
| mark_seenB | Mark a chat as seen (the sender sees "Seen"). |
| accept_requestB | Accept a message request, moving the chat to the inbox. |
| get_new_messagesA | Incoming messages newer than since_ms (epoch milliseconds). Use the newest timestamp_ms you've seen. |
| wait_for_messagesA | Wait for the next incoming DM on the realtime stream (up to |
| searchC | Search Instagram for users, hashtags and places. |
| get_profileC | A user's profile: name, bio, follower counts, privacy, etc. |
| get_user_postsC | A user's posts, newest first (count 6-50). |
| get_user_reelsC | A user's reels, newest first. |
| get_user_storiesB | A user's current stories (empty if none are live). |
| get_followersC | Who follows a user (which="followers") or whom they follow (which="following"). |
| get_friendshipB | Your relationship with a user: following, followed_by, requested, etc. |
| get_postB | One post or reel: caption, media URLs, author, like and comment counts. |
| get_commentsC | Comments on a post or reel. |
| get_feedC | Your home feed, reels feed or explore page. |
| get_hashtagC | Posts for a hashtag (without the #). |
| get_notificationsB | Your activity feed: likes, comments, follows, mentions. |
| like_postA | Like a post or reel, or remove the like (unlike=True). |
| save_postA | Save a post to your saved items, or remove it (unsave=True). |
| follow_userA | Follow a user, or unfollow them (unfollow=True). |
| comment_on_postB | Write a comment on a post or reel. Returns the comment's id (comment_pk). |
| delete_commentB | Delete one of your comments. |
| share_postB | Send a post or reel into a chat (thread_id) or to people by username. |
| publish_postA | Publish a photo post (1 image) or carousel (2-10 images) from files on this machine. PERMANENT: posts can't be deleted through the API. Confirm with the user first. |
| get_my_accountB | Your own profile settings: username, name, bio, privacy, profile photo. |
| update_profileA | Change your bio and/or display name. Fields you leave out stay as they are. |
| set_profile_photoA | Set your profile photo from an image file (it's centre-cropped to a square). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 33 tools
Most tools map to a distinct resource+action, and the DM group (list_threads, unread_threads, get_new_messages, wait_for_messages) is separated by clear descriptions of polling vs. realtime vs. inbox listing. Minor overlap remains between get_profile/get_my_account and get_user_posts/get_post, but descriptions disambiguate them well.
Nearly all tools follow a verb_noun pattern (update_profile, send_message, get_user_posts, like_post, delete_comment, publish_post). A few deviations exist—bare 'search', noun-only 'unread_threads', and verb+adjective 'mark_seen'—but the set is still highly readable and predictable.
33 tools is heavy for a single integration and verges on overwhelming, though the broad Instagram domain (DMs, profiles, feed, content actions, account settings) gives most tools a reason to exist. Some consolidation (e.g. separate photo/message senders, multiple message-fetch tools) would tighten the surface.
Coverage is strong: full DM lifecycle (send, read, react, unsend, accept, seen), profile/social graph, feed/hashtag/search reading, and post interactions. Gaps exist for saved-items listing, story publishing, block/mute, and post deletion (explicitly unsupported), which agents may need to work around.