Skip to main content
Glama

x-twitter.edit_post

Edit a recent post from a connected X account.

Call x-twitter.connected_accounts first. Pass user_id or user_name to target a specific account, or omit both to use the default account.

Requires post_id and at least one of text, media, paid_partnership, or made_with_ai.

Edits must be within X's one-hour window after posting. The authenticated X account may need X Premium for API edits. Posts with polls and some other types cannot be edited. Each edit returns a new post_id.

To attach media, upload files with files.upload_file and pass file_name values from files.list_uploaded_files.

Token pricing matches x-twitter.create_post: 60 tokens base, 1000 with URL, plus media surcharges.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoUpdated post text.
mediaNoFile names from files.list_uploaded_files to attach (up to 4). Upload with files.upload_file first.
post_idYesNumeric id of the post to edit.
user_idNoNumeric X user id from x-twitter.connected_accounts. Pass user_id or user_name to target a specific account, not both. Omit both to use the default account.
user_nameNoX handle from x-twitter.connected_accounts, with or without a leading @. Pass user_id or user_name to target a specific account, not both. Omit both to use the default account.
made_with_aiNoWhether the post contains AI-generated media.
paid_partnershipNoWhether the post is a paid partnership.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoPost text returned by the X API.
post_idNoNumeric id of the edited post returned by the X API.
user_idNoNumeric X user id of the connected account.
user_nameNoX handle of the connected account.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • changedInput schema / properties / media / description
      Previous value: -"File names from meta-tools.list_uploaded_files to attach (up to 4). Upload with meta-tools.upload_file first."New value: +"File names from files.list_uploaded_files to attach (up to 4). Upload with files.upload_file first."
  2. Changed2 schema fields changed
    • changedInput schema / properties / user_id / description
      Previous value: -"Numeric X user id from get-x-connected-accounts. Pass user_id or user_name to target a specific account, not both. Omit both to use the default account."New value: +"Numeric X user id from x-twitter.connected_accounts. Pass user_id or user_name to target a specific account, not both. Omit both to use the default account."
    • changedInput schema / properties / user_name / description
      Previous value: -"X handle from get-x-connected-accounts, with or without a leading @. Pass user_id or user_name to target a specific account, not both. Omit both to use the default account."New value: +"X handle from x-twitter.connected_accounts, with or without a leading @. Pass user_id or user_name to target a specific account, not both. Omit both to use the default account."
  3. Added

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly. It discloses prerequisites, account targeting behavior, the one-hour edit limit, possible X Premium requirement, ineligible post types, the fact that each edit produces a new post_id, media upload workflow, and token pricing. This is rich behavioral context beyond the schema.

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 front-loaded with a clear purpose and every sentence contributes useful information: prerequisites, parameter requirements, constraints, side-effect behavior, media workflow, and pricing. It is dense but not bloated, with no filler or repetition of schema content.

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 7-parameter tool with no annotations, the description covers the full invocation flow: connecting accounts, targeting accounts, required and optional parameters, time constraints, restrictions, media handling, and cost. The existence of an output schema means the description need not restate return values, so this is complete for an agent to select and call the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds valuable semantics by stating the conditional requirement ('at least one of text, media, paid_partnership, or made_with_ai'), explaining account selection via user_id/user_name, and giving the media workflow with files.upload_file and files.list_uploaded_files, which goes beyond the schema's field descriptions.

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 opens with 'Edit a recent post from a connected X account,' which uses a specific verb and resource, clearly distinguishing it from sibling tools like create_post and reply_to_post. It further narrows scope with constraints like 'within X's one-hour window' and 'Each edit returns a new post_id.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage context: call x-twitter.connected_accounts first, pass user_id/user_name to select an account, require post_id plus at least one editable field, and note the one-hour edit window. It does not explicitly name alternatives for when editing isn't possible, but it clearly implies that posts with polls or other restricted types cannot use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.1/5.0
Disambiguation5/5

Each tool has a distinct purpose, further clarified by group prefixes and clear descriptions. Within each group, tools perform different operations (e.g., domains.lookup vs. domains.whois vs. domains.rdap) with no ambiguity.

Naming Consistency5/5

All tools follow a consistent group.tool_name pattern using snake_case. The naming is predictable and uniformly applied across all groups.

Tool Count4/5

78 tools is high, but the server aggregates multiple distinct API domains (11 groups). Each group has a reasonable number of tools, typically under 10, with TikTok having 17. The count reflects breadth, not bloat.

Completeness5/5

Each domain's tool set covers the primary expected operations (e.g., search, details, reviews, metrics, user info). There are no obvious gaps for read-only analytical use; features like posting are likely out of scope.