Skip to main content
Glama
osAlhaddad1

instagram-mcp

by osAlhaddad1

instagram_login

Idempotent

Recover an expired Instagram session or submit a two-factor code. Reuses cached credentials to authenticate without forcing repeated logins.

Instructions

Authenticate with Instagram using the credentials in the server's .env.

Login is automatic on first use, so call this only to recover from an expired session or to supply a two-factor/challenge code. The session is cached on disk and reused, which matters: repeatedly logging in from scratch is what makes Instagram flag an account.

Args: verification_code: The code Instagram asked for, if any. force: Re-authenticate even if this process already holds a session.

Returns: logged_in (bool), logged_in_as (str), summary (str) describing whether a cached session was reused, and session_file (str) where it was saved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoDiscard the in-process session and authenticate again. Use after a session expires.
verification_codeNoSix-digit 2FA or challenge code, e.g. '123456'. Leave empty unless a previous call asked for one.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description discloses the session caching behavior ('The session is cached on disk and reused'), the automatic first-use login, and the risk of account flagging. These go beyond the annotations (idempotentHint, readOnlyHint, destructiveHint) and give the agent important operational context. There is no contradiction with annotations; the idempotentHint is consistent with the cached-session reuse when force is not set. The description also explains the return values, which adds transparency.

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: it opens with the core purpose, then immediately gives usage conditions, then lists parameters and returns. Every sentence earns its place, and the most important caveat (repeated logins) is front-loaded. Despite being longer than a single sentence, it is efficiently organized with explicit 'Args' and 'Returns' headings.

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

Completeness5/5

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

Given the tool's complexity (authentication with session management, 2FA, and force re-auth), the description covers all essential aspects: when to call it, what the parameters do, the return structure, and the critical warning about account flagging. The output schema exists, but the description still explains return fields, which is helpful. No critical information is missing for an agent to call this tool correctly.

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 schema already provides detailed descriptions for both parameters (force: 'Discard the in-process session and authenticate again. Use after a session expires.'; verification_code: 'Six-digit 2FA or challenge code, e.g. '123456''). The description adds little beyond the schema: it repeats 'Re-authenticate even if this process already holds a session' and 'The code Instagram asked for, if any.' With 100% schema coverage, the baseline is 3, and the description does not significantly augment parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Authenticate with Instagram using the credentials in the server's .env.' It also defines the exact scope: 'call this only to recover from an expired session or to supply a two-factor/challenge code.' This clearly distinguishes it from all sibling tools, including instagram_login_status, by stating what it does and when it is intended to be used.

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?

Explicit usage guidance is given: 'Login is automatic on first use, so call this only to recover from an expired session or to supply a two-factor/challenge code.' It also warns about the consequence of repeated logins ('repeatedly logging in from scratch is what makes Instagram flag an account'), which is a clear behavioral downside. The parameter descriptions in the schema reinforce when to use force ('Use after a session expires'). No alternative tools are named, but the conditions for use are unambiguous.

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

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