This page is auto-generated from the MCP server’s
tools/list. Run
scripts/sync-tools.py after backend changes to refresh it.generate_post
Generate a new LinkedIn post and persist it as a draft.Inputs
- subject: what the post should be about, with any brief, notes or document text to use. Max 150000 characters. Required unless notebook_idea_id is given.
- notebook_idea_id: write the post from a notebook idea (idea_id from
list_notebook_ideas), like “Use the idea” in the app: its notes, or
its title and elements, plus the text of its files (125000 characters
in all) become the subject, its post type is used unless
typeis given, and the idea is marked used. Not withsubject; extra direction goes inguideline. - type: optional. High-level intent: ‘actionable’ → tips, methods, operational lessons ‘aspirational’ → success stories, positive messaging ‘introspective’ → reflections, takes, vented frustration ‘promotional’ → launches, lead magnets, valuesales When omitted, the type is auto-detected from the subject.
- language: optional. Defaults to the user’s UI preference.
- tone: optional. Same vocabulary as the UI (‘standard’, ‘friendly’, etc).
- hook: optional. A custom opening line. Inserted verbatim.
- guideline: optional. Extra instructions appended to the prompt (tone, angle, facts to use). Max 10000 characters.
- signature: optional. Custom signature.
- writing_style_urn: optional.
- template_id + template_kind: optional, always together. The
idandkindof an entry returned by list_templates. The post then follows that template’s structure, hook and length (same as “Generate from a template” in the MagicPost editor);subjectis still what the post is about. Notypeis needed. - template_similarity: optional, only with a template. ‘close’ (default) → keeps the template’s structure, hook style and length, rewritten freely ‘identical’ → replicates the template’s format and structure very precisely
Templates
When the user asks for a post “from a template”, “with my template X” or “in the format of <template>”, call list_templates first (usequery with words from the template’s name), confirm the choice with
the user if several match, then pass its id and kind here. Never
paste a template’s text into guideline instead: the template mode
uses a dedicated prompt. template_not_found (404) → the id/kind pair
is not visible to this account; list again.
Writing style resolution
- DEFAULT (writing_style_urn empty): uses the user’s configured style:
if their UI has
profilePostsActive=truewith a profile URN attached, that profile’s recent posts feed the prompt as few-shot examples. IfprofilePostsActive=false, no style is injected. - “Generate in MY style” → leave writing_style_urn empty.
- “Generate in the style of
<other person>”: multi-step flow:- Call list_my_writing_styles() to check if that person is already imported on the user’s account.
- If not, call
find_writing_style_profile("<name or URL>")to locate a candidate URN with metadata. Profiles withready_to_use=truecan be attached immediately. - Call add_writing_style_profile(profile_url) to attach the
profile to the user’s account. If the response is
status: 'scraping_in_progress'or'import_started', tell the user to wait 1-3 minutes and re-call add_writing_style_profile (idempotent: it flips to ‘ready’ once enough posts are scraped). - Once
status: 'ready'or'already_imported', callgenerate_post(..., writing_style_urn=<the returned urn>). This overridesprofilePostsActivefor THIS call only.
Rate limits
Capped at 3 generations per minute, 20 per day, and 50 per week. A 429 response indicates which window was hit (rate_limited_generation): surface the limit reset hint to the user verbatim.Errors that need user action
- credits_insufficient (402) → user needs to upgrade.
- writing_style_not_imported (400) → the URN wasn’t on the user’s account; route through the import flow first.
- rate_limited_generation (429) → cap hit; surface counts + hint.
list_templates
List the post templates this user can generate from: the same library as the template picker of the MagicPost editor.Inputs
- kind: optional filter.
‘custom’ → the user’s own templates (and templates a teammate
shared with the organisation, with
author_name) ‘org’ → templates their organisation published for them ‘built’ → the MagicPost catalogue (~90 templates) Omitted: all three, the user’s own first, then the organisation’s, then the catalogue. - category: optional, catalogue category (‘actionable’, ‘inspirational’, ‘insights’, ‘promotional’).
- query: optional, case-insensitive text matched against the title and the preview. Use it when the user names a template.
- language: optional. Language of the catalogue templates (name or code). Defaults to the user’s content language. Pass the same value you will pass to generate_post.
- limit: 1-100, default 30.
totaltells how many matched.
Returns
{success, count, total, language, templates: [...]}. Each entry:
id, kind, title, category, family, preview (first ~280
characters of the template, enough to recognise its structure),
length_chars, and author_name for a teammate’s template.
To generate from one: generate_post(subject=…, template_id=<id>,
template_kind=<kind>). Show the user a short list (title + preview)
when the choice is not obvious.
list_my_writing_styles
List the LinkedIn profiles the user has imported as writing-style candidates, including which one is currently active in the UI. Use this before find_writing_style_profile when the user asks to generate “in the style of<person>”: if the person is already in
their imported list, skip search/import and pass the URN directly
to generate_post.
Returns
{success, count, writing_styles: [WritingStyleEntry, ...]}
Each WritingStyleEntry has:
- urn: opaque LinkedIn URN (use it as
writing_style_urn) - display_name: human-readable name
- profile_url: full LinkedIn URL (may be null on legacy entries)
- is_active: True for the currently active style (the UI default)
- valid_posts: how many of this profile’s posts we have ingested
- ready_to_use: True iff valid_posts >= 30 (below that the generated style will be weak)
find_writing_style_profile
Search the global LinkedIn profile catalog by name or LinkedIn URL. Use this AFTER list_my_writing_styles, when the person the user wants to mimic is not already imported on their account. The returned results indicateready_to_use (true iff the profile already has
= 30 valid posts ingested in our DB).
- query: a person’s full name (e.g. “Gary Vaynerchuk”) OR a LinkedIn URL. Both shapes are handled.
- limit: up to 25, default 10.
Returns
{success, query, count, results: [...]}
Each result has:
urn, full_name, headline, profile_url, followers, valid_posts,
ready_to_use, similarity.
similarity is null when the name contains the query. When nobody
does, the search falls back to names spelled closely (a typo such as
“jasminc alic” for “Jasmin Alić”) and similarity gives how close
(0 to 1): tell the user which person you found before using them.
After picking a candidate, call add_writing_style_profile(profile_url)
to attach it to the user’s account. If the candidate’s ready_to_use
is false, the import will still succeed but the import endpoint will
return status: 'scraping_in_progress' until enough posts are
ingested (~2 minutes).
add_writing_style_profile
Attach a LinkedIn profile to the user’s account as a writing-style candidate, scraping its posts if needed. Idempotent: re-calling with the same URL is safe. Use this exact re-call pattern when the response indicates scraping is in progress.Inputs
- profile_url: full LinkedIn URL (https://www.linkedin.com/in/…).
Returns
One of thesestatus values (HTTP status varies):
- ‘already_imported’ (200): URN was already on the user’s account. Proceed straight to generate_post.
- ‘ready’ (200): profile had >= 30 valid posts. Just attached. Proceed straight to generate_post.
- ‘scraping_in_progress’ (202): profile is known but understocked. A scrape was queued; the URN is already attached. Tell the user to wait ~2 minutes and re-call this same tool: it will flip to ‘ready’ once enough posts are scraped.
- ‘import_started’ (202): profile was unknown to our DB; an initial scrape was queued. Tell the user to wait ~3 minutes and re-call this tool.
- ‘quota_exceeded’ (402): user’s plan limit reached. Surface the hint to the user verbatim.
- ‘invalid_url’ (400): URL doesn’t resolve to a LinkedIn profile.
- ‘import_failed’ (4xx): could not fetch the profile. Verify the URL is correct and the profile is public.
urn as
writing_style_urn in generate_post once status is ready or
already_imported.
list_my_posts
List the user’s posts filtered by lifecycle status.- ‘draft’: created but not scheduled and not yet published
- ‘scheduled’: planified for future publication (sorted by schedule date asc)
- ‘published’: already on LinkedIn (sorted by created_at desc)
media_type (image, video, document or
text) and thumbnail_url: the post’s first image, the video’s
preview frame or the document’s cover, as a URL you can embed. It is
null for text posts and when no preview image exists.
get_post
Fetch the full record for a single MagicPost owned by the user. Besides the raw media list (file_post), the record carries
media_type and thumbnail_url, with the same meaning as in
list_my_posts.
post_id MUST be the MagicPost UUID (e.g.
“16a63f9a-0e13-43eb-b502-…”). It is NOT the LinkedIn share URN
exposed as linkedin_share_urn by get_metrics_summary. Passing a
URN returns error_type='invalid_post_id_format' (400).
To resolve a linkedin_share_urn into a MagicPost UUID:
- Call
list_my_posts(status="published"). - Find the row whose
linked_in_url_postcontains the URN. - Use that row’s
idhere.
post record, the response carries:
publication:{state, scheduled_at, published_at, linkedin_url, error}.stateis one of draft, scheduled, publishing, retrying, published, failed, missed (scheduled time passed by more than 10 minutes without publication: it will not go out on its own, reschedule it). On failed or retrying,errorgivesmessageand, when LinkedIn refused the post,linkedin_status(e.g. 422) andlinkedin_body(LinkedIn’s raw response). Check it right after a scheduled time to fix and republish without waiting for the email.scheduled_comments: the comments armed on the post.
create_or_update_post
Create a new draft post (no post_id) or update an existing one’s text.content is required, except on an update that only changes the poll
or the link preview display.
Poll: pass poll = {question, options, duration} to add or replace
the post’s LinkedIn poll: question up to 140 characters, 2 to 4
distinct options of up to 30 characters, duration ONE_DAY,
THREE_DAYS, SEVEN_DAYS (default) or FOURTEEN_DAYS. A poll and media
cannot coexist: on a post with media the call answers
poll_media_conflict (remove the media first with remove_post_media,
only if the user wants the poll instead). remove_poll=True removes
the poll of an existing post.
Link preview: when the text holds a URL, the first URL’s preview card
is fetched like in the app; the response carries link_preview (null
when the page is unreadable) or link_preview_pending: true (still
loading, get_post shows it later). Media or a poll are published
instead of the card. On an existing post, show_link_preview=False
hides the card (the link stays in the text, as plain text) and
show_link_preview=True shows it again, like the editor’s toggle.
This tool only creates or updates text and poll. To add an image, video, or PDF,
use attach_media_to_post for a chat-provided file, or the
prepare_post_media_upload / complete_post_media_upload flow for a local
file in a code or CLI client. On success returns
{success: True, post_id, created: bool}: use post_id (NOT id)
when chaining into schedule_post or publish_post_now.
@mentions: write @[Name](urn:li:person:<id>) (person) or
@[Name](urn:li:organization:<id>) (company page), copied unchanged
from the mention field of search_mentions or list_recent_mentions.
A plain “@Name” is published as text, without a tag. When the text
holds a mention that will not become a tag, the response carries a
mentions report (untagged_at_names, malformed_urns,
will_not_tag): fix the text before scheduling.
attach_media_to_post
Attach one image, video, or PDF to a draft, from a chat file or a public HTTPS link. Call this after create_or_update_post and before schedule_post or publish_post_now. The post must be an unscheduled, unpublished draft, must not contain a poll. The post ID and scheduled comments are preserved. alt_text is limited to 1000 characters; the separate title (shown on a PDF document post) to 400 characters. Pass exactly one source:media_file: a temporary file reference supplied by the chat host. Never invent or reuse itsdownload_url: it is consumed during this call and copied into permanent MagicPost storage.media_url: a public https:// link to the file itself (an image hosted on the web, a file the user shared by link). Never a page that merely displays the image. If the chat host offers no file to this tool, do not guess a URL or a file reference. claude.ai passes neither chat attachments nor files you created in your sandbox to tools. For something you create yourself (a carousel, a chart, a visual), use attach_html_slides instead. For a file the user has, call create_media_drop_link and give the user the link.
prepare_post_media_upload
Prepare a short-lived upload for a local image, video, or PDF. Use this when your environment can send the file’s bytes over HTTPS (Claude Code, a desktop client with network access). This remote server cannot read a local file path. Upload the bytes according toupload_request, then call complete_post_media_upload with the
returned upload_id.
In claude.ai, the code sandbox usually cannot reach the upload host
(its outbound proxy refuses it). If the upload fails on the network
(proxy refusal, 403 on CONNECT, DNS or connection error), do not
retry and do not fall back to attach_media_to_post: follow
if_upload_blocked in the response.
To replace all existing attachments, pass replace_existing=True here
AND when completing. Existing media stays until completion succeeds.
To add an image next to the post’s images (up to 9), pass append=True
here AND when completing; upload images one after the other.
complete_post_media_upload
Validate an uploaded local file and attach it to its draft. Call this after prepare_post_media_upload and the HTTPS upload. Re-calling a successfully completed upload is safe. Use replace_existing=True to replace all attachments, keeping the post and its comments, or append=True (same value as when preparing) to add an image after the existing ones. alt_text: max 1000 characters; title: max 400.update_post_media
Edit an existing draft attachment without losing its scheduled comments. Read media_url from get_post’s file_post; never invent it. Cancel any schedule first. Supply alt_text (max 1000 characters) and/or title (max 400); omitted fields stay unchanged, an empty string clears one. This does not replace the file. Use the upload tools with replace_existing=True for replacement. Published posts cannot change.generate_alt_text=True (images only, no alt_text then): MagicPost’s
AI writes the image’s alt text, like the app’s button (describes the
image, transcribes its text, in the post’s language), and saves it on
the media. The response carries alt_text. Takes a few seconds; shares
the app’s limit of 20 per minute and 300 per day (rate_limited).
To generate for several images, call once per image.
remove_post_media
Remove one attachment from a draft (itsurl from get_post’s
file_post; never invent it), or all of them with remove_all=True.
The text, the post ID and its scheduled comments stay. Cancel any
schedule first; published posts cannot change. To swap a file, prefer
attach_media_to_post with replace_existing=True.
create_media_drop_link
Create a temporary link where the user drops images, a video or a PDF from their browser to attach them to a draft, without logging in. Use it whenever the chat cannot hand the file to attach_media_to_post or your environment cannot upload it: claude.ai, an image the user only has on their computer or phone. Something you create yourself (carousel, chart, visual) goes through attach_html_slides instead, with no link. Creating the link frees an upload left pending on this draft by prepare_post_media_upload. Give the user theurl with
message_for_user, then wait for them to say it is done and call
get_post to check file_post.
- mode “add” (default): files are added after the draft’s images, up to 9 images in total; a video or a PDF must be alone on a post.
- mode “replace”: the first file dropped replaces all existing media. The link works for 30 minutes and only for this draft (unscheduled, unpublished, without a poll).
attach_html_slides
Design a visual or a carousel yourself in HTML/CSS: MagicPost renders it and attaches it to a draft. One slide becomes an image, 2 to 20 slides become a PDF carousel (LinkedIn document post). This is the way to attach something you create (carousel, chart, quote card, infographic): no file transfer, so it works in claude.ai where your sandbox files never reach tools. Each slide is one complete HTML document sized exactly 1080x1350 px (format “portrait”) or 1080x1080 px (“square”): set html and body to that size, overflow hidden. Rendered by Chromium with scripts and network blocked: no JavaScript, no external images or CSS. Allowed: inline CSS, inline SVG (charts, icons, shapes), small images as data: URIs, Google Fonts (fonts.googleapis.com). Keep text large (body 32px or more) and inside a safe margin. Each slide is checked for text that overflows, overlaps or is cut. If any is found, nothing is attached: you getissues per slide, fix those
slides and call again with ALL slides (or pass
ignore_layout_warnings=True). warnings (near the edge, low contrast)
never block. title is shown on a PDF carousel post.
replace_existing=True swaps the draft’s current media. append=True adds a
single image after the draft’s images (up to 9); a carousel must be the
only media.
list_labels
The user’s post labels (colored tags of posts and notebook ideas):{id, name, color, post_count}, the limit (30) and the colors. With
post_id (a MagicPost post UUID), also post_label_ids, the labels
on that post. Changes: manage_labels.
manage_labels
Change the user’s post labels (read with list_labels). The same labels tag notebook ideas (label_ids of manage_notebook_idea).
- “create”: a label named
name(64 characters max, unique ignoring case).coloris optional (default: the first color not used yet). Colors are French names: rouge (red), orange, jaune (yellow), vert (green), bleu (blue), violet, rose (pink), gris (grey). - “update”: rename (
name) and/or recolor (color) labellabel_id. - “delete”: delete label
label_id; it disappears from every post and idea that had it. Ask the user before deleting. - “set_on_post”: on post
post_id, put the labels ofaddand take off those ofremove, each given by id or by name. A name the user does not have yet is reported innot_found; passcreate_missing=trueto create it, only when the user asked for a new label. Returnspost_label_ids, the post’s labels after the call.
list_post_discussion
The internal discussion of MagicPost posts: messages, comments on a passage of the text and replies left by the account, its organisation admins and its client through a shared calendar link. Not LinkedIn comments.- With
post_id(a MagicPost post UUID): that post’s threads, oldest first. Each thread haskind(“message” or “anchored” onquote, a passage of the post),author_type(“guest” = the client through a shared link, “owner” = the account or an admin of its organisation, named inauthor_name),is_mine,resolved,unread(a client message arrived after your last read) andreplies. Alsopost: its schedule and validation state (approved: false= waiting for validation, it will not be published until approved). - Without
post_id: the posts that have comments, with counts (open_client_threads,open_own_notes,unread), most to handle first. Readget_postorget_calendarfor their text and date. team=true(org admins only, nopost_id): one line per account you manage, withbadge, the number shown next to it in the app.
manage_post_discussion
Write in the internal discussion of a MagicPost post (draft or scheduled), or change its validation state, as the app does. Not LinkedIn comments. Your comments are signed with your name.- “comment”: post
content(2000 characters max). Passparent_id(a thread id from list_post_discussion) to reply in that thread, orquote, a passage copied exactly from the post text (get_post), to comment on that passage (occurrence: which occurrence of the passage, 0 = first). The account’s client is emailed a digest of new comments about 10 minutes later, as in the app: confirm the wording with the user before posting. - “edit”: replace the
contentof your own commentcomment_id. - “delete”: delete comment
comment_id, yours or anyone’s (the account moderates its posts’ discussions). Ask the user first. - “resolve” / “reopen”: close or reopen thread
comment_id. - “mark_read”: mark the post’s discussion as read by you.
- “approve”: validate the post, it can be published at its scheduled time. Only on the user’s explicit request: on an account in validation mode, approving replaces the client’s own validation. “require_validation”: put it back on hold, it will not be published until approved. On an account of your organisation, this is the app’s validation switch of the team calendar.
delete_post
Delete one of the user’s posts (post_id from list_my_posts,
get_calendar or get_post).
- A draft or a scheduled post is removed from MagicPost; a scheduled post will not go out. To keep the post and only stop it from going out, use cancel_scheduled_post instead.
- A post already PUBLISHED (from MagicPost or directly on LinkedIn)
is deleted from LinkedIn too, and that cannot be undone. The first call answers
published_post_confirm_requiredwithout deleting anything: show the post to the user, get an explicit yes, then call again withconfirm_delete_on_linkedin=true. Never set it without that yes.
token_expired, ask the user to reconnect
LinkedIn in MagicPost, then retry.
Returns
{success, post_id, deleted_from_linkedin, deleted_from_magicpost}.
duplicate_post
Copy one of the user’s posts (draft, scheduled or published) into a new draft, like “Reuse this post” in the app: same text, same poll (votes reset), same link preview and, by default, the same media. The new draft is linked to the original in the post’s reuse history. Use this when the user asks things like:- “Repost my best post from last month”
- “Make a copy of this draft so I can try another version”
Returns
{success, post_id (the new draft), source_post_id, has_poll, media_copied}.
list_media_library
List the media saved in the user’s MagicPost media library: files uploaded in the app, and visuals or carousels made with MagicPost (source “ai”). Use this when the user asks things like:- “Use my photo from last week’s post”
- “Which visuals do I have in my Client X folder?”
- “Show my favorite images”
folder_id (from get_media_library_overview) lists one folder only.
sort="size" puts the heaviest files first (to free storage).
Returns
{assets: [{asset_id, name, asset_type, source, url, thumbnail_url, size_bytes, is_favorite, is_profile_photo, client_visible, usage_count, folder_id, created_at}]}. Show thumbnail_url (or
url) to the user to pick one, then call
attach_library_media_to_post with its asset_id, or
manage_media_asset to change it.
get_media_library_overview
Folders, counts and storage of the user’s media library, plus its setting for new media shared with the client. Use this when the user asks things like:- “Which folders do I have in my media library?”
- “How many videos do I have?” / “How much storage am I using?”
- “Are new media visible to my client by default?”
Returns
{counts: {all, image, video, document, gif, audio, favorite}, used_bytes, storage_quota_bytes, folders: [{folder_id, name, asset_count, created_at}], settings: {default_client_visible}}.
storage_quota_bytes is the 5 GB shown in the app; no upload is
refused at that mark. Use a folder_id with list_media_library or
manage_media_asset, and manage_media_folder to change folders.
manage_media_folder
Create, rename or delete a folder of the user’s media library.create:name(80 characters max). Returns{folder}; move media into it with manage_media_asset (action=“update”, folder_id).rename:folder_id(from get_media_library_overview) andname.delete:folder_id. By default the media stay in the library, outside any folder. Withdelete_media=truethe media are deleted with the folder: the first call answersfolder_media_delete_confirm_requiredwithasset_count; tell the user how many media will go, and only after their explicit yes call again withconfirm_delete_media=true.
manage_media_asset
Add, change, delete or share media of the user’s media library. Actions:add: save a file in the library frommedia_url(a public https:// link to the file itself) ormedia_file(a file reference supplied by the chat host). Optionalname,folder_id,is_profile_photo(images only). A file already in the library is not stored twice: the answer then hasreused: trueand the existing media. Images, GIFs, videos and PDFs, 100 MB max.prepare_upload/complete_upload/abort_upload: for a client that uploads local bytes over HTTPS (Claude Code).prepare_uploadtakesfile_name(also docx, pptx, xlsx, mp3, wav, m4a), optionalmime_type,content_hash(“sha256:<hex>” of the whole file: a duplicate is answered at once, no upload),name,folder_id,is_profile_photo; send the bytes asupload_requestsays, thencomplete_uploadwithupload_id. On a network refusal, followif_upload_blocked.update:asset_idwith any ofname,folder_id(move) orremove_from_folder=true,is_favorite,is_profile_photo(an image only),client_visible(shown in the client’s space). Passasset_idsinstead to move, favorite or share up to 100 media at once (not rename nor profile photo).delete:asset_id. Posts already using the file keep it. Ask the user before deleting.send_to_client: org admins of an agency. Copiesasset_ids(50 max) from the user’s library into the library ofmember_user_id(from list_org_members), shared with that client.set_default_client_visible:default_client_visibletrue or false: whether media added later are visible to the client by default (the account’s setting on the Media page).
member_user_id has two meanings: with send_to_client it is the
client who receives the media; with every other action it is the
member whose library you change (an upload started for a member is
completed or aborted with the same member_user_id).
To put a library media in a post, use attach_library_media_to_post.
attach_library_media_to_post
Attach a media of the user’s library (asset_id from
list_media_library) to one of their drafts (post_id), without
uploading the file again.
Same rules as attach_media_to_post:
- the post must be a draft: cancel the schedule first if it is scheduled; a post with a poll cannot have media;
append=trueadds an image next to the post’s images (9 at most; a video or a PDF must be alone);replace_existing=trueswaps the post’s media for this one;- with neither, the post must have no media yet.
alt_text: optional description of the image for accessibility.
Returns
{success, post_id, media, media_count, asset_id}.
search_mentions
Find the LinkedIn person or company page to @mention in a post or a comment, by name or by LinkedIn URL.- query: a name (“Jane Doe”, “Acme”) or a profile/page URL (https://www.linkedin.com/in/jane-doe, https://www.linkedin.com/company/acme). A URL is the most reliable way to pick the right person; a name search can return homonyms. Name searches cost nothing; URLs are limited to 30 per hour.
name, headline, type (person or company),
tagged_before (the user already tagged this profile: usually the
right one among homonyms), can_tag and mention. If several
results could match and none was tagged before, ask the user which
one (show the headlines) instead of guessing.
Paste the mention value into the post text with create_or_update_post
(or into a comment). Do not tag a result with can_tag: false: write
the name as plain text and tell the user why (warning).
To tag the people the user usually tags (their team), call
list_recent_mentions first: no search needed.
list_recent_mentions
List the people and company pages the user has already tagged in MagicPost, the most recently added first: typically their team, their company page and regular partners. Each item has the same shape as search_mentions results, with a ready-to-pastemention. Use it when the user says “tag the team” or
names someone they tag often; fall back to search_mentions for anyone
missing.
schedule_post_comment
Arm a comment that MagicPost publishes on LinkedIn under the user’s post,minutes_after minutes after the post goes live (0 = right
after publication). Typical use: the “first comment” with the link.
The post must be one of the user’s own posts that is NOT published
yet: a draft, or a post already scheduled with schedule_post. Arm the
comment before or after scheduling, it follows the post’s real
publication time. A post can carry several comments; call once per
comment.
- text: max 1250 characters (LinkedIn’s limit).
- minutes_after: 0 to 10080 (one week). Default 0.
{success, post_id, comment_id, text, minutes_after, ...}.
Use comment_id with delete_post_comment to remove it; to change a
comment, delete it and schedule a new one. get_post lists the post’s
comments under scheduled_comments.
Errors: post_already_published (409) when the post is live or being
published; failed_tag when a mentioned member can’t be tagged;
scheduled_comments_forbidden when the user’s plan doesn’t include
scheduled comments (do not retry). The call is not retried
automatically: on a network error, check get_post before calling
again, or the comment may be armed twice.
delete_post_comment
Remove a comment armed with schedule_post_comment, before it is published on LinkedIn. A comment already published (or being published) cannot be removed here:comment_already_published (409).
list_received_comments
List the comments people left on one of the user’s published LinkedIn posts: text, author (name, headline, profile URL), date, and whether it is a reply (with its parent comment). Pass exactly one ofpost_id (MagicPost UUID of a post published
through MagicPost) or linkedin_activity_id (from
list_linkedin_post_metrics, works for any post of the user). Only the
user’s own posts are allowed.
This reads what MagicPost has already collected, it costs nothing.
Comments are collected by a third-party provider, not by LinkedIn’s
official API, and only when a sync runs: compare comments_stored
with post.comments_on_linkedin and look at last_sync. If comments
are missing or stale, call sync_received_comments, wait about a
minute, then call this tool again.
synced: false means the post is not imported yet (just published):
retry later.
sync_received_comments
Fetch the latest comments of one of the user’s published posts from LinkedIn (through MagicPost’s data provider), in the background. Same references as list_received_comments. Uses one unit of the user’s daily comment sync quota (returned insync_quota); a sync already running or started less than a few
minutes ago returns already_running and costs nothing. On
comment_sync_quota_reached, do not retry: read the stored comments.
Returns status: running right away. Wait about a minute (longer for
posts with hundreds of comments), then call list_received_comments:
last_sync.state tells whether the sync is done.
reply_to_comment
Reply to, and/or react to, a comment someone left on one of the user’s OWN published posts, from the user’s LinkedIn account.- comment_id: the
comment_idof a comment returned by list_received_comments (never invent it). - post_id / linkedin_activity_id: the same post reference used with list_received_comments (exactly one).
- text: the reply, max 1250 characters. To @mention someone, paste a
mentionfrom search_mentions. - reaction_type: react to the comment: LIKE, PRAISE (celebrate), EMPATHY (love), INTEREST (insightful), APPRECIATION (support), ENTERTAINMENT (funny). It replaces a previous reaction. remove_reaction=true removes the user’s reaction instead. Pass text, a reaction, or both.
message_for_user
to the user right away, in their language (with both, the reaction’s
is under reaction). Replying to 10 comments is fine: call once per
comment, they are spread over the next minutes. If the reaction is
refused, the reply is not queued. list_engagement_queue shows what is
pending, sent or failed; cancel_queued_engagement cancels it.
engage_with_post
React to and/or comment on a LinkedIn post (typically someone else’s) from the user’s account.- post_url: the post link (linkedin.com/posts/…, /feed/update/urn:li:activity:…, or a lnkd.in short link), OR post_urn (urn:li:activity:<digits>).
- comment: the comment text, max 1250 characters. To @mention someone,
paste a
mentionfrom search_mentions. - reaction_type: LIKE, PRAISE (celebrate), EMPATHY (love), INTEREST (insightful), APPRECIATION (support), ENTERTAINMENT (funny). Pass both to like AND comment: send them in ONE call, they go out as a single visit (the reaction a few seconds before the comment).
engagement_forbidden otherwise: do not retry).
Nothing is sent instantly: actions are QUEUED and spaced like a person
would engage, so LinkedIn does not flag the account. Limits: 100
comments and 100 reactions per 24 hours, actions made in the
MagicPost app included (replies to comments on the user’s own posts
have their own 200, see reply_to_comment); 20 comments and 30
reactions per hour; 75 s to 3 min between comments. Engaging with 20 posts is fine:
call once per post right away, the queue spreads them out.
Always relay message_for_user to the user right away, in their
language: it says when each action goes out. capacity tells what is
left: warn the user before queuing more than that. An action that
could not go out within 12 hours (daily limit reached) is NOT queued
and the response says so (engagement_not_queued): tell the user, do
not retry.
list_engagement_queue
List the reactions, comments and replies queued by engage_with_post and reply_to_comment (a reaction to a received comment has kindcomment_reaction): pending ones first (with
starts_in_seconds), then those of the last 7 days (sent with their
comment_url, failed with their error).
capacity tells, per type, how many were done in the last 24 hours
(app included), how many are queued and the next free slot. Two
separate comment quotas: comments (on other people’s posts, 100 per
24 h) and replies (to comments on the user’s own posts, 200). Use it
when the user asks “what’s left today?” or before queuing a batch.
Report failed items to the user: they will not be retried.
cancel_queued_engagement
Cancel an action of the engagement queue before it goes out (itsid from engage_with_post, reply_to_comment or list_engagement_queue).
An action already sent cannot be cancelled here
(queued_action_not_cancellable). Cancelling a comment does not
cancel the reaction queued with it: cancel both if needed.
get_engagement_feed
Read the Engagement feed of the MagicPost app: recent LinkedIn posts of the creators the user follows, to like or comment on. Use it when the user wants to engage with their network, catch up on their lists, or asks “what should I comment on today?”. Views:- latest (default): the latest post of each followed creator, from all lists or from one list (list_id, from list_engagement_lists).
- creator: all posts of ONE followed creator (profile_id =
author.profile_id of a feed post), paginated by limit (max 48) and
offset;
creator_statstells how many of their posts the user already liked or commented. - daily: today’s selection “Recommended today” (8 posts from the
user’s network, chosen once a day in the user’s timezone), with
rank,reasonandprogress. Paying accounts only, and only once the user engaged with 20 posts in the last 7 days (recommendations_paid_onlyordaily_engagement_thresholdotherwise: tell the user, do not retry).
post_urn and post_url to pass to engage_with_post,
the full text to write a relevant comment, the author (with
comments_on_your_posts and lead_fit when known) and engagement:
liked, commented (with the comment), what is still queued, and done
according to the account’s rule (counts.engaged_criterion). A
queued like or comment counts as done: never queue it twice.
Reading the feed counts as a visit to the Engagement page: MagicPost
checks the followed creators for new posts more often for users who
visit it, so reading it regularly keeps the feed fresh.
Paginate with offset / next_offset. counts gives the totals of
the selection (total, to_engage, engaged). Requires the Engagement
feature of the user’s plan (engagement_forbidden: do not retry).
get_engagement_activity
The user’s engagement on other people’s posts, as the Engagement screen of the app shows it.- summary (default): the daily or weekly goals (likes and comments)
with today’s or this week’s progress (
likes_left,comments_left, weeks start on Monday, in the user’s timezone); over the lastdaysdays: likes, comments, posts engaged, a per-day breakdown (days without activity left out) and thetop_profilesthe user engaged with most;trial_capsfor an account in trial (posts it can still engage with). - journal: the history of comments (with their text and link) and
likes, most recent first. kind = all, comments or likes;
from_date / to_date as ISO 8601 (to_date excluded, default now).
When
truncated, passnext_toas to_date for the next page.
engagement_forbidden: do not retry).
manage_engagement_feed
Change what the Engagement screen of the app shows, for the user’s own account. The change is visible in the app too. Actions:- update_goals: the engagement goals. goal_period = day or week, likes_goal and comments_goal from 1 to 100 per day or 1 to 500 per week. Pass only what changes; switching to day lowers a goal above 100 to 100.
- set_engaged_criterion: when a feed post counts as done: liked_and_commented (default), commented or liked.
- hide_post / unhide_post: hide a feed post (post_id from get_engagement_feed) so it leaves the feed. With list_id, only in that list; without, in every list that follows its author (unhide without list_id shows it everywhere again).
- hide_daily_post / unhide_daily_post: hide or restore a post of today’s selection (post_urn from the daily view).
engagement_forbidden: do not retry).
list_engagement_lists
Read the user’s Engagement lists: the lists of LinkedIn people and company pages they follow in MagicPost to like and comment on their posts (the “Engagement on other posts” page). Use this when the user asks things like:- “Which creators do I follow in my Engagement lists?”
- “Find Jane Doe so I can add her to my Prospects list”
- “Who should I add to my Engagement lists?”
- Default: the lists in the app’s order, each with its
creators(urn,name,headline,typeperson or company,profile_url,status: loading while being added, success, warning when no post could be read, failed).limitsgives the account’s caps (max_lists,max_profiles_per_list, and, on a free trial,max_tracked_profilesand usage).list_id: one list, plussync(profiles active, quiet, silent, synced in the last 2, 6, 24 h), to show before a sync.include_creators=false: names and counts only. search: a name (“Jane Doe”, “Acme”) or a LinkedIn link (https://www.linkedin.com/in/jane-doe). Returns people and pages with theirurnandin_list_ids(lists that already hold them). Name searches cost nothing; links are limited to 30 per hour (shared with search_mentions). If several results could match, ask the user which one (show the headlines).suggestions: profile suggestions, one tab of the app at a time:for_you(people the user interacts with),prospects(their leads and similar profiles; optionaldescriptionof the target,icp_id,fit,section),teammates,creators(creators close to the user’s profile),dismissed(hidden suggestions).available_kindslists the tabs open to this account.
manage_engagement_list
Change the user’s Engagement lists (the LinkedIn people and pages they follow in MagicPost to engage with their posts). Actions:create:name(and optionalicon, one emoji). Returnslist.rename:list_id, andnameand/oricon.delete:list_id. Deletes the list; creators in no other list stop being followed. Confirm with the user before deleting.reorder:list_ids= every list id of the account, in the new order.add_creator:list_id(orlist_ids, at most 10) and eitherprofile_url(https://www.linkedin.com/in/… or /company/…, resolved by MagicPost) orurnfrom list_engagement_lists(search=…) (or thepublic_urnof a suggestion), with itsname(the suggestion’sfull_name),headline,picture_urlandcreator_type(itstype) copied from that result. Adding someone already in the list changes nothing. The creator starts in status “loading” while its posts are fetched.remove_creator:list_idandurn(orurns). A creator in no other list stops being followed.dismiss_suggestion/restore_suggestion:urn(the suggestion’spublic_urn) to hide from, or show again in, suggestions.sync:list_id. Fetches the latest posts of the list’s profiles now, in the background (about 15 s per profile), like “Sync the list” in the app. Active profiles are always synced;include_quiet/include_silent(default true) add the quiet and silent ones;skip_synced_within_hours(2, 6 or 24) skips profiles synced that recently. Returnsselected(profiles being synced). One sync per list every 10 minutes (sync_cooldownwithretry_after_seconds, orsync_already_running: do not retry). list_engagement_lists(list_id=…) gives the counts to show first,is_syncingandlast_synced_at; read the feed once done.
error_type
“trial_engagement_cap_reached” with cap, limit and used: do
not retry, tell the user. Outside a trial a list holds at most 99
profiles (error_type “engagement_list_full”).
manage_engagement_gesture
Undo or change a like or a comment the user already made on a LinkedIn post (from MagicPost, the app or engage_with_post). Identify the post with post_url (linkedin.com/posts/…, /feed/update/urn:li:activity:…, or lnkd.in) OR post_urn (urn:li:activity:<digits>), as returned by get_engagement_feed or get_engagement_activity. Actions:unlike: remove the user’s reaction.edit_comment: replace the user’s comment withtext(max 1250 characters; @mentions as@[Name](urn:li:person:...)from search_mentions). Show the new text to the user first: it is public.delete_comment: delete the user’s comment on LinkedIn. Confirm with the user first.forget_comment: only after delete_comment answeredcomment_not_on_linkedin(the comment is already gone from LinkedIn; refused otherwise) and the user agrees: removes it from MagicPost, changes nothing on LinkedIn.
cancelled_from_queue, nothing was posted);
edit_comment answers gesture_still_queued: cancel it with
cancel_queued_engagement and queue the new text with engage_with_post.
If the post has both a published comment and one waiting in the queue,
the call answers ambiguous_comment with both: ask the user, then call
again with target “published” or “queued”.
linkedin_relogin_required: the user must reconnect LinkedIn in
MagicPost. A scheduled comment under the user’s OWN post is managed
with delete_post_comment, not here.
list_comment_bookmarks
The user’s saved comments: reusable comment texts (optional image) for others’ posts (source “engagement”) or comments under their own
posts (source “my_posts”), most used first.
To post one, pass its text to engage_with_post. Changes:
manage_comment_bookmarks.
manage_comment_bookmarks
Change the user’s saved comments (read with list_comment_bookmarks). Actions:create:text(max 1250), optionalname(generated from the text otherwise),source(default my_posts),media_url.update:bookmark_idand the fields to change;remove_media=truedrops the image.delete:bookmark_id. Confirm with the user first.mark_used:bookmark_id, after the user used it in a comment (keeps the “most used first” order of the app).
media_url must be an image already stored by MagicPost (the
media_url of another bookmark or of a comment).
get_engagement_recommendations
The Recommendations space of the user’s Engagement page: LinkedIn profiles worth following and engaging with. Use this when the user asks things like:- “Who should I engage with?” / “Recommend people to follow”
- “Show me what this recommended person posts about”
- “Which of my posts did Jane comment on?”
profiles(default): recommended profiles, ranked. Each item haspublic_urn, name, headline, company, country, followers,sources(why: mutual, lead, commenter, liker, creator, org_member, same_company),interactionswith the user’s posts,posts_per_week,niche,matchscore. Filters:source(engagers = people who comment or like the user’s posts),countries/excluded_countries(names as infacets.countries),niches/excluded_niches(ids fromfacets.niches),min_posts_per_week,followers_min/followers_max,sort. Page withcursor=next_cursor.topic_posts:profile(apublic_urnfrom profiles): up to 3 recent posts of that profile on themes shared with the user.interaction_posts:profileandkind(commented or liked): the user’s posts of the last 90 days that profile commented on (with the comments) or liked.my_interactions: the people whose posts the user recently liked or commented on LinkedIn. The first call may take several seconds when it was never computed (computed_now).
public_urn to manage_engagement_list
(action add_creator). To engage with a post, use engage_with_post.
Profile suggestions per tab (for you, prospects, teammates, creators)
are in list_engagement_lists(suggestions=…).
score_post
Run MagicPost’s Post AI score on a LinkedIn post: the same scan as the editor’s “Score IA”. Pass plaintext to check a post before
creating a draft, or the post_id of one of the user’s posts (its
current text is scored, unless text is also given).
Returns {success, grade, score, fluency_score, language, flagged, post_id, scanner_version}:
- grade: A (doesn’t sound AI) to E (sounds too AI), the grade shown in the editor.
- score: 0 to 100, the higher the more AI-sounding.
- flagged: each flagged passage with
excerpt(the exact words),category(the AI tell family, e.g. contrast_formula, here_is),severity(strongtells lower the grade,weakones are informative) andexplanation. Rewrite strong ones first. There is no suggested rewrite: propose your own fix for each passage, keeping the author’s meaning and voice.
ai_score_quota_reached, do not retry before reset_at.
add_idea_to_notebook
Save a post idea to the user’s MagicPost Idea notebook, to write later. The idea appears at the top of the notebook, like an idea typed in the app. Use this when the user asks things like:- “Save this idea in my MagicPost notebook”
- “Add these 3 topics to my ideas” For several ideas, call the tool once per idea.
Parameters
- idea: the idea itself, short (a topic, an angle, a hook). Max 2000
characters. May be empty only if
notesis given. - notes: optional longer context kept with the idea (sources, angle, personal anecdote, outline). Max 100000 characters.
- column_id: optional board column to create it in (ids from the
columnsof list_notebook_ideas; “used” files it as already used). - category / post_type: optional, from the
categoriesandpost_typeslisted by list_notebook_ideas. - label_ids: optional labels, ids from the
labelsof list_notebook_ideas.
Returns
{success, idea_id, idea, notes, created_at}. The call is not
retried: on a network error, check with the user before calling again,
or the idea may be saved twice.
list_notebook_ideas
List the ideas saved in the user’s MagicPost Idea notebook, in the order of the notebook board. Use this when the user asks things like:- “What ideas do I have in my notebook?”
- “Find my idea about pricing”
- “Which ideas haven’t I used yet?” (status=“unused”)
- “Show my starred ideas” (is_favourite=true)
Parameters
- scope: “notebook” (default) = the ideas of the Notebook page (typed by the user or added from their share link). “all” = the Pinned ideas page: also the ideas pinned from the generator or the chat.
- status: “unused” (still to write) or “used” (already turned into a post). Omit for both.
- query: optional text search in the idea title.
- is_favourite: only starred (true) or non starred (false) ideas.
- category: only the ideas of one category (see
categories). - limit / offset: pagination (max 50 per page).
Returns
{ideas: [{idea_id, idea, notes, status, column_id, is_favourite, source, category, post_type, elements, label_ids, labels, attachments: [{id, name, mime, size_bytes, kind}], client_visible, author, listed_for_client, created_at, updated_at}], total, has_more, columns, notebook_default_client_visible, labels, post_types, categories}. Long notes are cut to their first 2000 characters here
(notes_truncated: true): get_notebook_idea returns them in full.
columns lists the board columns {id, label} (column “used” = the
idea was already used), notebook_default_client_visible (new ideas
shown to the agency client); labels the account’s labels {id, name, color}. client_visible / listed_for_client only matter on
a notebook shared with an agency client or for approval.
get_notebook_idea
Read one idea of the user’s MagicPost Idea notebook in full: notes, elements, labels, attached files, client visibility. Getidea_id
from list_notebook_ideas.
To read an attached file, also pass its attachment_id (from the
idea’s attachments):
- attachment_content=“text” (default): the text extracted from a text, Markdown, Word or PDF file. Images and audio have no text.
- attachment_content=“download_url”: a private link to the file, valid one hour. Share it only with the user.
Returns
The idea{success, idea_id, idea, notes, ..., attachments}, plus
attachment: {attachment_id, text} or {attachment_id, url, expires_in_seconds} when attachment_id is passed.
manage_notebook_idea
Change, copy or delete one idea of the user’s MagicPost Idea notebook. Getidea_id from list_notebook_ideas.
Actions
- “update”: only the fields you pass change.
idea(title),notes(orclear_notes=true);column_id: move to a board column (ids from thecolumnsof list_notebook_ideas);move_to_top=true: first of its column;is_favourite: star or unstar;category,post_type(lists in list_notebook_ideas), orclear_category_and_type=true;elements: replace the idea’s supporting points (max 10);label_ids: the idea’s labels, replacing the current ones ([]removes them all; ids from thelabelsof list_notebook_ideas);client_visible: show or hide the idea in the notebook the account shares with its agency client (or for approval).
- “mark_used”: mark the idea as used, as the app does once a post is written from it. Typical flow: read the idea, write the post with generate_post or create_or_update_post, then call this.
- “mark_unused”: put a used idea back on the board.
- “duplicate”: copy title, notes, elements, category, type and labels into a new idea at the top of the notebook (files are not copied).
- “generate_elements”: let MagicPost write 3 to 5 supporting points for the idea from its title, notes and attached files (one AI generation), and save them on the idea, replacing the current ones.
- “delete”: delete the idea and its attached files. This cannot be undone: confirm with the user first.
Returns
The idea after the change, the new idea for “duplicate”,{elements}
for “generate_elements”, or {success, idea_id, deleted}.
manage_idea_attachment
Attach a file to an idea of the user’s notebook, or remove one. An idea holds up to 5 files of 50 MB at most: PDF, Word (.docx), text (.txt, .md), images (.jpg, .png, .webp, .heic) and audio (.m4a, .mp3, .wav). The text of documents feeds “generate_elements”.Actions
- “add_from_url”: MagicPost downloads the file from a public https
link (
file_url) and attaches it. Passfile_namewith its extension when the link has none. - “prepare_upload” then “complete_upload”: for a client that can send
local bytes over HTTPS (Claude Code, Desktop). Pass
file_nameandsize_bytes, send the file as described inupload(PUT tourlwith the given headers, within 15 minutes), then call “complete_upload” with the returnedattachment_id. If the upload is blocked by your network, do not retry: use “add_from_url” or ask the user to add the file in the app. - “delete”: remove the file
attachment_id(or cancel a prepared upload). Confirm with the user first.
Returns
{success, attachment: {id, name, mime, size_bytes, kind}}, the
upload ticket for “prepare_upload”, or {deleted}.
manage_notebook_columns
Change the columns of the user’s notebook board and the setting “new ideas visible to the client” (read with list_notebook_ideas).Actions
- “add”: a new column named
label, placed before “used”. - “rename”: give column
column_idthe namelabel. - “remove”: delete column
column_id; its ideas move to the first column. “backlog” and “used” cannot be removed. Confirm first. - “reorder”:
column_ids= every column id in the new order (“used” always stays last). - “set_default_client_visible”:
enabled= whether new ideas written in the notebook are shown to the agency client (or for approval) by default.
Returns
{success, columns, notebook_default_client_visible, ideas_moved_from_columns}.
get_idea_generator
Read the user’s MagicPost idea generator (My ideas > Generator).Views
- “overview” (default): the generator’s sources (themes, personas,
URLs, files, each with its
source_id), its settings, the batches already generated (one per source, withlatest_generation_id), the remaining generation quota and the acceptedpost_types. - “batch”: every version of the ideas generated for one source. Pass
generation_styleandsource_idexactly as listed in the overview’sbatches. Each idea hasidea_id,subject,category,post_type,elements,pinnedandpinned_idea_id(its id in the notebook when pinned). - “suggestions”: topic ideas (“theme”) or audience ideas (“persona”)
already suggested from the user’s LinkedIn profile. Pass
kind.has_context=falsemeans none were generated yet: use manage_idea_sources(action=“suggest”).
manage_idea_sources
Add, edit or delete the sources the idea generator draws from, or suggest new ones from the user’s LinkedIn profile.Actions
- “add_theme”: a topic the user writes about (
theme: a few words, or a pasted brief up to 10000 characters). - “add_persona”: an audience (
name, optionaldescription). At most 30 personas. - “add_url”: an article or web page (
url). Its content is read and summarised now: allow up to two minutes. Refused when the page cannot be read. - “add_file”: a document (PDF, DOCX, TXT, MD, CSV) or an image (JPG,
PNG, GIF, WEBP), up to 20 MB. Pass
file_url(a public https link to the file itself) ortext(content you already have, such as a transcript, saved asfile_name, default notes.txt). The same file sent twice is not read again. Allow up to two minutes. - “update”: rename a theme (
kind="theme",source_id,theme) or change a persona (kind="persona",source_id,nameand/ordescription). URLs and files cannot be edited. - “delete”: remove a source (
kind,source_id). This also deletes every batch of ideas generated from it (ideas already pinned to the notebook stay). Confirm with the user first. - “suggest”: generate 4 new suggestions from the LinkedIn profile and
recent posts (
kind="theme"or"persona"). Nothing is added: show them, then add the ones the user picks with add_theme or add_persona. Needs LinkedIn connected.
source_id (pass it to generate_ideas),
{deleted: true}, or {suggestions}.
generate_ideas
Generate a batch of 6 LinkedIn post ideas with the MagicPost idea generator, exactly like the Generate button of the app. Each call adds a new version to the source’s batch and uses one generation of the user’s idea quota (shared with the app). Allow up to two minutes. Do not retry automatically after a timeout: check the batch first (get_idea_generator view=“batch”).Parameters
- generation_style: what the ideas are drawn from.
“theme”, “url”, “persona”, “file”: a source of the generator, pass
its
source_id(get_idea_generator, or manage_idea_sources to add one). “posts”: the user’s own posts, passpost_refs(MagicPost post ids from list_my_posts, or LinkedIn share URNs). “creator_post”: posts by other creators, passpost_refs(theidof search_inspiration_posts results). “from_idea”: an idea of the notebook, pass itsidea_id(list_notebook_ideas) assource_id. - post_type: the kind of post: Actionable (advice, how-to), Aspirational (story, vision), Introspective (lesson, opinion), Promotional (offer, lead generation).
- instruction: optional angle for “url” and “file” only (max 500 characters), for example “focus on the pricing part”.
{generation_id, version_number, ideas: [{idea_id, subject, category, post_type, elements}], generation_quota}.
Next steps: manage_generated_idea to develop (generate_elements), edit
or pin an idea to the notebook; generate_post to write the post.
Errors: idea_generation_forbidden (403, plan without the idea
generator), idea_generation_rate_limit (429, quota used up until
reset_at).
manage_generated_idea
Act on one idea of a generated batch. Getgeneration_id and
idea_id from generate_ideas or get_idea_generator(view=“batch”).
Actions
- “edit”: change the idea’s
subjectand/or itselements(list of short supporting points; an empty list clears them). - “generate_elements”: write 3 to 5 supporting points (facts, angles, examples) for the idea, saved on it. Allow up to two minutes.
- “pin”: save the idea to the user’s notebook, linked to its batch,
with its category and elements, like the pin button of the app.
Returns
pinned_idea_id, the idea’s id in the notebook. When the idea is pinned, edit and generate_elements also update its notebook copy. To unpin it or mark it as used, call manage_notebook_idea withpinned_idea_id(delete or mark_used). To write the post, call generate_post with the subject and elements.
update_idea_generator_settings
Change how the idea generator works, like its settings panel in the app. Only the fields you pass change; they apply to the next generations (app and assistant alike).- use_ai_context: use what MagicPost knows of the user’s profile (expertise, audience, offer).
- use_previous_posts: draw on the user’s past posts to avoid repeats.
- use_categories: spread ideas across post categories.
- language: language of the ideas, as a language name (for example
“English”, “Français”, “Español”).
reset_language=truegoes back to the user’s post language.
get_generation_settings
Read what MagicPost knows about the user and how it writes their posts: the “Knowledge base” page of the app. Without source_id, returns:- settings: default writing settings used by every generation:
language, language_variant, custom_language, tone, emojis,
register (tutoiement or vouvoiement), gender, person (I or We),
length. null means never set.
optionslists the accepted values. - identity: first_name, last_name, headline (the author shown on post previews), job_title, company_name, summary (what they do), persona (their audience), offer, personal (their story), website, and linkedin_profile_suggestions (title, job and company read from their analysed LinkedIn profile, never saved by themselves).
- writing_style: the LinkedIn profile whose style is applied
(active, name, urn) and
imported, the styles of the account (urn, name, is_current, mode “faithful” or “inspired”, last_used_at: date of the last post generated with it, null when unknown). Switch to, set the mode of or delete one with manage_generation_settings (switch_writing_style, set_writing_style_mode, delete_writing_style); import a new one with find_writing_style_profile then add_writing_style_profile. - instructions:
enabled(master switch: when off, neither the manual instructions nor the ones from documents are applied),manual(with instruction_id),from_documents(rules extracted from the user’s documents, toggled per document). - learned_preferences: what the MagicPost chat learned (enabled, items with memory_id and version). null when unavailable.
- knowledge: AI memory switches (memory_enabled, posts_enabled,
posts period, posts_indexed_count) and the documents and texts of
the knowledge base (
sources, each with source_id, target, processing_status, is_active, family, a short summary).
manage_generation_settings
Change what MagicPost knows about the user and how it writes their posts, as on the “Knowledge base” page of the app. Read the current state with get_generation_settings first.Actions
- “update_settings”:
settings, an object with only the keys to change: language (a listed language, or any other language name), language_variant (e.g. “British English”, “Español Rioplatense”), tone, emojis, register, gender, person, length (values listed inoptionsof get_generation_settings; tone and emojis “user” follow the imported writing style), first_name, last_name, headline (author shown on post previews; a missing one keeps its current value), job_title, company_name, summary, persona, offer, personal, website (an empty string clears a field), writing_style_active (true or false: apply the imported style), instructions_enabled (true or false: the master switch of the instructions). Invalid values are refused, nothing is saved. - “draft_profile_field”: let MagicPost write
field(summary, persona, offer or personal) from the user’s LinkedIn posts and documents (optionalwebsitefor the offer). Takes up to a minute. Nothing is saved: show the draft, then save it with update_settings if the user agrees. - “update_memory”:
memorywith memory_enabled and/or posts_enabled (booleans), or posts_max_age_months (1 to 36) or posts_since_date (YYYY-MM-DD), not both; null resets the period to all posts. - “add_instruction”:
text(max 2000 characters), optionalis_active(default true). Applied to every generation while the instructions are enabled. - “update_instruction”:
instruction_idwithtextand/oris_active. - “delete_instruction”:
instruction_id. Confirm with the user first. - “add_source”: add a document or a text to the knowledge base.
target: “profile_context” (who they are, what they talk about) or “writing_style” (how they write: style guides, rules). Passtextwith atitle(max 20000 characters), orfile_url(a public https link to a PDF, DOCX, TXT or MD file, up to 20 MB; optionalfile_name). At most 20 sources. The analysis runs in the background (a few minutes): the source is used once its processing_status is “ready”. - “update_source”:
source_idwith exactly one ofis_active,instructions_enabled(apply the rules extracted from it) orcondensed_context(correct what was extracted, max 6000 characters; only once ready). - “retry_source”:
source_id, run a failed analysis again. - “delete_source”:
source_id. Confirm with the user first. - “add_preference”: a preference or fact for the AI memory
(
content, 3 to 600 characters,kinddefault “preference”). - “update_preference”:
memory_id,version,kindandcontentfrom get_generation_settings. - “delete_preference”:
memory_idandversion. - “switch_writing_style”:
writing_style_urn, one of writing_style.imported. It becomes the active style, turned on, and tone and emojis switch to “user” (they follow that style). - “set_writing_style_mode”:
writing_style_urnandwriting_style_mode: “faithful” (default: reproduces the habits of that style closely: sentences, punctuation, phrasing, layout) or “inspired” (its tone and spirit, with freer writing and structure). Stored per style, used whenever that style is active. - “delete_writing_style”:
writing_style_urn, one of writing_style.imported. Confirm with the user first. Deleting the active style switches to the first remaining one; deleting the last one turns the style off (tone “standard”, emojis “none”).
schedule_post
Schedule a post for future publication on LinkedIn.- at_iso: ISO 8601 datetime. If naive (no offset), it is interpreted in the user’s timezone. If it has an offset, it is converted.
- timezone: optional IANA tz name override (e.g. ‘Europe/Paris’). Falls back to the user’s stored timezone, then UTC.
- confirm_same_day: when True (default), the call returns 200 with
success: false, warning: 'same_day_posts'if the user already has other posts scheduled on the same day. Show the warning to the user, and retry with confirm_same_day=false only after they confirm. - confirm_exact_slot: same behavior for posts scheduled within ±5
minutes (a stronger signal of a likely mistake). This check is
evaluated FIRST and short-circuits the same-day check, so an
exact-slot warning (
warning: 'exact_slot_conflict') will be returned alone even if there are other same-day posts.
actionable: true with a
hint: surface it to the user verbatim, do not retry blindly.
Returns error_type='daily_post_limit_reached' (429) with limit and
retry_at when this slot would exceed the number of posts the
LinkedIn profile may publish per 24 hours (published and scheduled
posts both count). Tell the user and pick a later slot: do not retry.
cancel_scheduled_post
Cancel a scheduled post: it goes back to drafts, nothing is deleted. Idempotent: returns success even if the post is no longer scheduled. Returns 409 if the post is already published (cannot un-publish).publish_post_now
Publish a post to LinkedIn immediately (no schedule). On LinkedIn token expired, returnsactionable: true with a
reconnect hint. Returns 409 if the post is already published.
Returns error_type='daily_post_limit_reached' (429) with limit and
retry_at when the LinkedIn profile already reached its number of
posts per 24 hours: tell the user, do not retry.
get_calendar
Show the user’s MagicPost content calendar over a period, as the app’s calendar shows it: the posts scheduled to go out, the posts already published on LinkedIn (with MagicPost or directly on LinkedIn), and the ideas placed on calendar days (planned topics with no post written yet). Use this when the user asks things like:- “What’s planned for next week?”
- “Do I have gaps in my calendar this month?”
- “When is my next post going out?”
- “What did I post last month?”
Parameters
- date_from / date_to: the period, both included, as YYYY-MM-DD (UTC days). At most 93 days.
Returns
{scheduled_posts: [{id, post_content, schedule_date, schedule_timezone, media_type, approved, publishing_failed, ...}], published_posts: [{post_id, published_at, linkedin_post_url, text_preview, media_type, num_impressions, num_likes, num_comments, num_reposts, published_with_magicpost, is_boosted}], calendar_ideas: [{calendar_idea_id, content, date, notebook_idea_id, client_visible, placed_by_org_admin_id}], timezone}.
approved: false means the post waits for the account owner’s
validation; publishing_failed: true means its last publication
attempt failed (get_post for details). client_visible: false marks an
idea kept internal to the agency (hidden from the client’s shared
calendar).
To act on a scheduled post use its id with schedule_post,
cancel_scheduled_post or get_post; on a published post use post_id
with get_post, duplicate_post or delete_post; on a calendar idea use
manage_calendar_idea.
manage_calendar_idea
Plan a topic on a calendar day without writing the post yet, as the user does by dropping an idea on the MagicPost calendar. Nothing is published or scheduled on LinkedIn.Actions
- “place”: put an idea on a day. Pass
date(ISO 8601 date-time, e.g. “2026-12-03T09:00:00+01:00”) and eithercontent(a new topic) ornotebook_idea_id(an idea of the notebook, from list_notebook_ideas: it keeps a single place, placing it again moves it). A used idea cannot be placed. - “update”: change the
content, thedateand/orclient_visibleof a calendar idea (calendar_idea_id, from get_calendar). - “remove”: take the idea off the calendar (
calendar_idea_id). A notebook idea stays in the notebook.
Options
- client_visible: for an agency working on a client’s account, false keeps the idea internal (hidden from the calendar shared with the client), true shows it. Omitted: a new idea placed by the agency is internal, any other idea is visible, as in the app.
get_recommended_posting_times
Recommended days and hours to publish on LinkedIn, the same data as the heatmap of the MagicPost scheduler: median engagement of millions of LinkedIn posts by day and hour, scored 0-100. Use this before choosing a slot with schedule_post, or when the user asks “When should I post?”.Parameters
- country: the audience’s country in English (e.g. “France”, “United States”, “United Kingdom”) or its code (FR, US, GB). Omitted: the user’s own country, as in the app. “global”: data of all countries.
- include_grid: true to also get the 168 day x hour cells. Default: only the 10 best slots.
- include_countries: true to also get
available_countries, the countries with their own data (the app’s country picker). Always returned when the requested country has no data.
Returns
{top_slots: [{day, hour, score}], country_requested, country_used, posts_analysed, available_countries?}. Hours are the local time of
country_used; country_used: null means global data (the requested
country has no data of its own).
list_linkedin_post_metrics
List per-post LinkedIn metrics for an inclusive date range. Includes posts published natively on LinkedIn as well as posts published through MagicPost, provided they have been imported into MagicPost analytics. Use YYYY-MM-DD fordate_from and date_to.
Results are ordered newest first and paginated. When has_more is
true, call this tool again with cursor=next_cursor and the same date
range. Continue until has_more is false.
linkedin_activity_id and linkedin_post_id are not MagicPost UUIDs
and cannot be passed to editing, scheduling, or publishing tools.
Metrics that were not collected are null, not 0.
Beyond impressions, reactions, comments and reposts, each post
carries LinkedIn’s extended analytics: reach (unique members who saw
the post), saves, link_clicks, premium_cta_clicks,
profile_views (profile visits generated by the post), sends (times
the post was sent in LinkedIn messages) and followers_gained (followers
LinkedIn attributes to the post). They are null
until LinkedIn has been asked for them, which advanced_metrics_available
tells you (advanced_metrics_updated_at gives the date). A 0 means
LinkedIn answered zero, so never read a null as a zero.
When the connected identity is a company page, LinkedIn does not measure
saves, premium_cta_clicks, profile_views, sends or
followers_gained at all: they come back
null and are listed in advanced_metrics_unavailable_for_profile_type.
Say the metric does not exist for pages rather than reporting zero.
Each post also carries media_type (image, video, document,
article, poll or text) and thumbnail_url: the post’s image, the
video’s preview frame, the document’s first page or the article image,
as a URL you can embed in a report. It is null for text and poll posts,
and when no image was stored for the post.
get_metrics_summary
Get a compact summary of the user’s LinkedIn analytics. Returns top-line totals, follower growth for the selected period, and the top N posts by impressions.totals and averages_per_post cover impressions, likes, comments and
reposts, plus LinkedIn’s extended analytics: reach (unique members
reached), saves, link_clicks, premium_cta_clicks,
profile_views, sends and followers_gained (followers LinkedIn
attributes to the posts). These are null when no post in the window carries
them, and their average is computed over the posts that do, not over
every post in the window. advanced_metrics_coverage.posts_with_data
gives that count per metric, so compare it to totals.posts_count
before reading an extended figure as a period total. On a company page,
LinkedIn does not measure saves, premium_cta_clicks,
profile_views, sends or followers_gained: they are null and listed in
advanced_metrics_coverage.unavailable_for_profile_type, so say the
metric does not exist for pages rather than reporting zero.
followers.gained is null when
LinkedIn did not provide enough snapshots to cover the whole period.
Check followers.coverage; available_range_gained is explicitly
limited to the returned coverage dates.
followers.daily returns compact {date, gained} points, so use one
multi-day call instead of one request per day when building a roll-up.
These are profile-level daily gains, not followers attributed to a
specific post.
Use period to scope the window. For most questions like “how did I
perform recently?” use ‘30d’.
Each top_posts entry carries media_type (image, video,
document, article, poll or text) and thumbnail_url: the post’s
image, the video’s preview frame, the document’s first page or the
article image, as a URL you can embed in a report. It is null for text
and poll posts, and when no image was stored for the post.
Identifiers (IMPORTANT):
top_posts[].linkedin_share_urn is the LinkedIn share URN, NOT the
MagicPost UUID expected by get_post, schedule_post,
cancel_scheduled_post, publish_post_now, or
create_or_update_post. Passing it to those tools returns
error_type='invalid_post_id_format'.
To act on a top post, resolve the URN to a MagicPost UUID:
- Call
list_my_posts(status="published"). - Find the row whose
linked_in_url_postcontains the URN. - Use that row’s
id(UUID) withget_post/schedule_post/ etc.
get_metrics_freshness
Check when LinkedIn post metrics were last updated. Call this beforerefresh_my_posts. When should_refresh is false,
reuse the stored metrics instead of starting another refresh. When no
metrics timestamp exists, data_available is false and
should_refresh is true.
refresh_my_posts
Trigger a fresh pull of the user’s LinkedIn posts and wait until done. Checkget_metrics_freshness first. If should_refresh is false, do
not start another refresh unless the user explicitly requires a forced
refresh. It is a slow, expensive call: the backend scrapes LinkedIn in
the background and this tool waits for the refresh to finish, which
usually takes a minute or two and can take much longer for a profile
with hundreds of posts. Call it once and wait for the result: do NOT
call it again back-to-back if it errors, as each call re-triggers the
full scrape.
max_wait_seconds is only an upper bound on how long this tool waits.
If the result comes back with status ‘timeout’, the refresh is still
running in the background: tell the user to check back shortly
instead of calling again.
get_insights
Read the insights of the MagicPost Statistics page beyond the raw stats: how the account compares with similar creators, which formats, post lengths and days work, and who engages with its posts. Pick oneview per call:
reach_benchmark: impressions percentiles (p25, p50, p75, p90) per follower tier for every creator tracked by MagicPost, for one complete month, plus the user’s follower count, tier and median impressions that month (user.tier_percentilesis the user’s tier row).month(YYYY-MM) must be one ofavailable_months(the last 6 complete months); omitted = the last complete month.peer_benchmark: where the user’s median impressions per post sit among creators of the same follower range (user_percentile, 0 to 100, share of peers below the user;benchmark.lower/mid/high= peers’ p25, p50, p75;peer_count). Usesperiodordate_from+date_to.format_performance: per format (TEXT, IMAGE, VIDEO, DOCUMENT (carousels included), POLL, ARTICLE), the user’s median impressions vs the median of peers in the same follower range;ratio> 1 means the format beats peers. Only formats with at least 2 posts and 5 peers. Usesperiodordate_from+date_to.impressions_trend: the user’s median impressions per month vs the p25 to p90 band of creators in the same tier, overmonthscomplete months (1 to 24, default 12). A missing month means no post that month.post_length: a 0 to 100 score per word-count bucket (max_words50, 100, … 400), based on each post’s impressions relative to its author’s usual level, across all tracked creators; plus the user’s median word count and bucket.best_days: a 0 to 100 score per weekday across all tracked creators (how often a day is a creator’s best day for impressions), plus the days the user posts most (user_top_posting_days, days with at least 20% of their posts). For the best hours in a country, useget_recommended_posting_times.audience: who likes and comments on the user’s recent posts: countries, cities, job domains, industries, segments, company sizes, follower sizes, Premium / Creator / Open to work shares (percentages of analysed profiles; verticals and archetypes are multi-label and can sum above 100).analysis.statesays where the analysis is:never_run(start it withmanage_audience_analysis),running(figures partial),enriching(results there, profiles still being completed),readyorerror. While running or enriching, read the view again afteranalysis.reread_after_seconds.last_data_atis the freshness of the data.
period: 30d, 90d (default, like the app), 180d, 365d or all.
Or pass date_from and date_to (YYYY-MM-DD) instead of period.
data is null with reason='insufficient_data' when there is not enough
to compare (no posts with impressions in the period, unknown follower
count, too few peers): say so rather than inventing a figure.
Market-wide figures are cached by the app. The first reach_benchmark of a
month can take up to 30 seconds; if it times out, wait a minute and call
once more instead of retrying in a loop.
manage_audience_analysis
Start or stop the analysis of who likes and comments on the user’s recent LinkedIn posts (the Audience tab of the Statistics page).refresh: start a new analysis. It runs in the background (usually 2 to 4 minutes) and collects the engagers of the recent posts, so ask the user first.status='started': readget_insights(view="audience")later,analysis.stateturnsready.status='already_fresh': the audience was analysed less than 7 days ago with enough data, nothing was re-scanned.error_type='already_running'(409): an analysis is in progress, do not retry, read the audience view later.stop: stop the running analysis and keep what it gathered so far. It also ends the completion of profiles that may still be running.error_type='not_running'(409) when nothing runs.
force (skip the 7-day freshness rule) is reserved to MagicPost
administrators. Call once: never in a loop.
search_inspiration_posts
Search the global LinkedIn inspiration catalogue (NOT the user’s own posts) for high-performing examples to draw inspiration from. Use this when the user asks things like:- “Find me top posts about <topic>”
- “Show me viral French posts on remote work this month”
- “What’s <creator> posting that gets traction?”
Filters
- query: free-text. Matches against post text + theme (PostgreSQL FTS).
- creator_name: partial match on poster’s display name.
⚠️ ILIKE scan: slower than
poster_urn. Preferposter_urnwhen you already have it (e.g. from a previous result). - poster_urn: exact LinkedIn URN: indexed, fast.
- languages: e.g. [“French”, “English”]. Use the pycountry English name (not ISO codes, not native names).
- formats: subset of {text, image, video, carousel, article}.
- post_types: subset of {actionable, aspirational, introspective, promotional}. Case-insensitive on input; backend matches Capitalize.
- days_range: shortcut “posts from the last N days”. Ignored when
date_from/date_toare set. - date_from / date_to: ISO date strings (YYYY-MM-DD). Inclusive.
- min_likes / max_likes / min_words / max_words: numeric bounds. Default minimums (20 likes, 80 words, 5 comments) are applied by the backend to keep the catalogue noise-free even when filters are sparse.
Sorting
- ‘recent’ → posted_at DESC
- ‘top_likes’ → num_likes DESC (default, best for inspiration)
- ‘top_comments’ → num_comments DESC (proxy for discussion-driving)
Pagination
- page: 1-indexed. Start at 1, increment to walk through results.
- limit: up to 12 per call. Default 10. The response includes
has_moreso you know when to stop.
Returns
{success, page, per_page, total, has_more, count, posts, filters_applied}
Each post has: id, text (full), theme, type, format, language,
posted_at (ISO), num_likes, num_comments, num_reposts, words,
poster_name, poster_urn, poster_headline, profile_followers_count,
post_url, image_url, video_url, document_cover_urls.
Common workflows
- “Get me 5 great hooks on <topic>”: query=<topic>, limit=5, sort_by=‘top_likes’.
- “Latest carousels by <creator>”: creator_name=<name>, formats=[‘carousel’], sort_by=‘recent’.
- “Inspiration close to what I’m writing”: pass the user’s draft
theme as
query, leave other filters open.
list_collections
List the user’s collections of saved LinkedIn posts (the “Saved” posts of the Inspirations page in MagicPost), with the posts in each, most recently saved first. Use this when the user asks things like:- “What did I save in my Hooks collection?”
- “Show my saved posts”
- “Write a post inspired by the ones in my Storytelling collection”
- collection_id: one collection only.
- include_posts=false: names and counts only.
-
posts_limit: posts returned per collection (
post_countis the full count,posts_truncatedsays when some were left out).
Returns
{collections: [{collection_id, name, scope ("account" or "org"), can_manage, can_share, dedicated_to, post_count, posts: [{post_id, text, poster_name, post_url, num_likes, ..., can_remove}]}], agency}.
scope="org" is a collection of the user’s agency; dedicated_to is
the client account it is for (null = all accounts). agency (only in
an agency) lists recipients, the client accounts a collection can
be dedicated to. Change collections with manage_collection.
manage_collection
Create, rename or delete a collection of saved LinkedIn posts, or save a post in it or remove it. Actions:create:name. By default the collection belongs to the account. In an agency, its team (owner or admins) can passtarget="agency"to create it for the agency, withfor_member_id= the client account it is for (fromagency.recipientsof list_collections), or nofor_member_idfor all accounts.rename:collection_idandname.delete:collection_id. Deletes the collection only, never the posts. Confirm with the user before deleting.share_with_agency:collection_idof an account collection, which becomes a collection of the agency (agency team only).set_recipient:collection_idof an agency collection andfor_member_id(nofor_member_id= all accounts).add_post:post_idandcollection_id(orcollection_ids). Saves the post without removing it from other collections. Apost_idis theidof a post from search_inspiration_posts or thepost_idof a post from list_collections; to save another LinkedIn post, use import_linkedin_post with its URL.remove_post:post_idandcollection_id(orcollection_ids). The answer listsremoved_fromandnot_removed.
import_linkedin_post
Save a LinkedIn post, from any author, into one of the user’s saved posts collections, from its link. Same as “Import a post” in the Inspirations page of MagicPost.url is the post’s link: https://www.linkedin.com/posts/…,
https://www.linkedin.com/feed/update/urn:li:activity:… or a
https://lnkd.in/… short link from LinkedIn’s “Copy link to post”.
A profile, article or company page link is refused.
collection_id is the id of one of the user’s collections (or of a
collection their agency shares with them). Ask the user which one when
it is not obvious.
Use this when the user asks things like:
- “Save this LinkedIn post in my ‘Hooks’ collection”
- “Add https://www.linkedin.com/posts/… to my inspirations”
already_in_collection=true).
Returns
{success, post: {id, text, poster_name, posted_at, num_likes, num_comments, num_reposts, format, post_url, ...}, collection: {id, name, scope: 'account'|'agency'}, already_in_collection, newly_fetched, partial}. partial=true: text and author were saved
but not the post’s visual, document or video.
On post_unavailable the post was deleted or its author restricts
its visibility: tell the user, do not retry.
list_leads
List the user’s LinkedIn leads (prospects detected from the engagement on their posts and qualified against their ICPs).Filters
- icp_id: scope the list to one ICP. When set, each lead embeds its
qualification against that ICP (level A/B/C + icebreaker).
Get valid ids from
list_icps. - level: qualification level filter (A is the best fit, C the
weakest listed: D-scored profiles are not leads: never billed,
never listed). Only effective when
icp_idis also provided. - contact_status: pipeline status slug. Defaults are ‘not_contacted’, ‘contacted’, ‘in_discussion’, ‘to_follow_up’, ‘won’, ‘lost’, ‘not_relevant’ (users can customize them). ⚠️ A lead that was never touched has contact_status null, and this filter only matches explicitly-set statuses: so filtering on ‘not_contacted’ does NOT return untouched leads. To find leads the user hasn’t contacted yet, list WITHOUT this filter and read each item’s contact_status (null or ‘not_contacted’ = not contacted).
- search: free-text match on the lead’s name/headline.
- favorite: True to show only favorited leads.
Pagination
- limit: up to 100 per call (default 20). To read a whole list, use limit=100.
- offset: 0-indexed. Use
offset+has_morefrom the response to paginate, one page after the other.
{items, count, limit, offset, has_more}.
get_lead
Full detail of one lead: profile, interactions (likes/comments on the user’s posts), qualification reasoning, icebreaker, and CRM sync state (deliveries to connected external CRMs).
Get prospect_id values from list_leads.
list_icps
List the user’s ICPs (Ideal Customer Profiles). Needed to get theicp_id values used by list_leads (scoping) and
detect_leads (targeting). Each ICP describes the kind of prospect
the user wants to detect; leads are scored A/B/C against it (a
D-scored profile is not a lead: free, and never listed).
Each ICP carries its definition (title, prompt), its filters
(default_filters), its keywords (heuristic_rules: strong, weak,
anti) and digest_status (‘computing’ while its scoring profile is
being built, ‘ready’, or ‘failed’). archived_at set = archived.
Change one with update_icp, create one with create_icp.
suggest_icps
Suggest 3 to 4 ICPs (Ideal Customer Profiles) for the user, written from their LinkedIn profile and recent posts. Use it when the user has no ICP yet (list_icps is empty) or asks who they could target.
Suggestions are generated in the background (about 5 to 15 seconds)
and reused for 7 days. Returns {status, suggestions}:
- status ‘generating’: call this tool again in about 10 seconds.
- status ‘ready’:
suggestionsis a list of{title, description}. An empty list means the profile has too little content to suggest anything: help the user describe their target instead. - status ‘error’: the generation failed; help the user describe their target instead.
create_icp with its title and description.
create_icp
Create an ICP (Ideal Customer Profile): the kind of prospect the user wants to find. Leads are scored A/B/C against it, anddetect_leads targets every active ICP by default.
Get the user’s agreement on the title, description AND filters before
calling: each call creates a new ICP (call list_icps first to avoid
a duplicate), and the number of ICPs per account is capped. Ask about
the target countries: most ICPs filter on them, and without a country
filter the ICP matches the whole world.
Definition
- title: short segment name, 3 words at most (e.g. “SaaS founders”).
- description: 3 to 4 concrete sentences describing ONLY the target: role, company type and context, their problem or need, what they are looking for. It is used as is to score every lead, so it must not talk about the user or their offer.
- example_urls / negative_example_urls: optional LinkedIn profile URLs of people who fit / who look close but must NOT be leads.
- countries / excluded_countries: English LinkedIn country names (“United States”, “United Kingdom”, “France”, “Germany”). A country filter is strict: a lead known to live elsewhere is dropped.
- industries / excluded_industries: LinkedIn industry labels (“Software Development”, “IT Services and IT Consulting”, “Marketing Services”, “Business Consulting and Services”).
- employees / excluded_employees: company size buckets.
- cities / excluded_cities: free text city names.
- gender: ‘all’ (default), ‘f’ or ‘m’.
- profile_flags: profiles must have ALL listed flags.
- followers_min / followers_max: LinkedIn follower bounds.
- revenue_min / revenue_max: company annual revenue in euros, one of
250000, 500000, 1000000, 2000000, 5000000, 10000000, 20000000,
50000000, 100000000, 250000000, 500000000, 1000000000. Estimated
from headcount, industry and country: only a company clearly too
small is dropped. Convert other currencies first.
A value the app does not know is refused with
error_type: 'invalid_filter_values',invalid_valuesand the fullallowed_values: fix the values from that list, never drop the filter silently.
update_icp.
Organisation ICP (admin of a Team organisation): for_org=true creates
it at the organisation level, turned on for the creator and for
member_ids (ids from list_org_members) or all_members=true. Members
at their ICP cap come back in skipped. The response is then
{icp, activated, skipped}. An existing ICP goes to the organisation
with manage_icp action ‘share_to_org’.
Returns the created ICP (with its id). Its scoring profile and
keywords are prepared in the background for a minute or two; it is
listed by list_icps right away. Errors: icp_limit_reached (409:
relay the hint, do not retry), invalid_input (400, e.g. an invalid
profile URL).
update_icp
Change one of the user’s ICPs: its definition, filters or keywords. Get the user’s agreement on the change first. Read the ICP withlist_icps (its default_filters and heuristic_rules) before
editing a list.
Only the parameters you pass change; everything else is kept. A list
you pass REPLACES that list (send the full list, existing entries
included); [] clears it.
-
title, description, example_urls, negative_example_urls: same rules
as
create_icp. Changing the description or the examples rebuilds the scoring profile (a minute or two) and marks the previous scores of this ICP as outdated. -
Filters: same parameters and allowed values as
create_icp. followers_min=0 removes the minimum, followers_max=0 removes the maximum; same for revenue_min / revenue_max. - strong_keywords / weak_keywords: words or phrases found in a lead’s headline, job, about or company description that signal a fit (strong) or a likely fit (weak). anti_keywords: words that rule a lead out. Changing keywords or filters re-sorts the existing prospects of this ICP in the background, without AI cost.
-
regenerate_keywords=true: rewrites the strong and weak keywords
from the ICP’s current scoring profile (anti_keywords are kept),
like the “regenerate” button of the app. Use it after changing the
description, once
list_icpsshows digest_status ‘ready’: call it alone, or with filters, title or anti_keywords, never with a new description, examples, strong_keywords or weak_keywords. Refused withicp_not_ready(409) while the profile is being rebuilt. - color: the ICP’s tag color in the app.
heuristic_warnings when the new
keywords contradict the ICP’s own examples (show them to the user).
Errors: icp_archived (409, relay the hint), icp_not_ready (409,
wait and retry), invalid_filter_values (400, fix from
allowed_values).
get_icp
One ICP in full: definition, filters, keywords, digest_status, sharing state,example_profiles (name and headline of each example
URL) and auto_engagement (whether its A/B/C leads feed an
engagement list).
Pass check_strong_keywords / check_weak_keywords / check_anti_keywords
to test keywords BEFORE saving them: keyword_check.heuristic_warnings
lists the contradictions with the ICP’s own examples (e.g. an
anti-keyword that would rule out an example profile). Nothing is
saved; save with update_icp.
list_org_icps
The ICPs shared at the organisation level (Team organisations).- Admin of the organisation:
view: 'admin', the whole catalogue with, for each ICP, which members use it, plusmembers_total. Manage it withmanage_icp(actions ‘set_members’, ‘unshare_from_org’) and create one withcreate_icp(for_org=true). - Member:
view: 'member', the shared ICPs they can turn on for themselves withmanage_icpaction ‘activate’. An agency or a user without organisation gets an empty list: in an agency each client account keeps its own ICPs.
manage_icp
One action on one ICP. Get the user’s agreement first.- ‘archive’ / ‘unarchive’: an archived ICP is skipped by lead detection and scoring, its leads are kept. On an organisation ICP it only archives it for the user.
- ‘share_to_org’: turns the ICP into an organisation ICP (Team
organisations), so other members can use it. Without member_ids, it
is only offered to them (
list_org_icps, view ‘member’). An admin can also turn it on for members right away: member_ids (ids fromlist_org_members) or all_members=true; an admin can do this with a member’s own ICP too. Members at their ICP cap are listed inskipped. - ‘unshare_from_org’: back to a personal ICP of its creator.
- ‘activate’ / ‘deactivate’: turn an organisation ICP on or off for the user (counts toward their ICP cap while on).
- ‘set_members’ (admin): the exact list of members who use this
organisation ICP; members left out are removed (never the creator).
member_ids=[] keeps only the creator, all_members=true adds everyone.
Returns
activated,removed,skipped. - ‘rebuild_scoring_profile’: recompute the scoring profile, e.g. when digest_status is ‘failed’. Takes a minute or two.
- ‘move’: display position among the user’s ICPs,
position0 = first. - ‘enable_auto_engagement’: leads scored at the
fit_levels(e.g. [“A”, “B”]) are added to a dedicated engagement list, now and from then on. ‘disable_auto_engagement’ stops it and keeps the list.
not_org_admin, not_team_org, icp_limit_reached,
icp_archived: relay the hint, do not retry.
score_icp_leads
Run the user’s existing prospects through an ICP.- mode ‘prequalify’ (free, instant): keyword pass with the ICP’s keywords and filters. target ‘unevaluated’ (default, prospects never sorted for this ICP) or ‘all’ (sort everyone again).
- mode ‘score’ (AI, CONSUMES LEAD CREDITS: 1 per prospect scored A, B
or C, D is free): target ‘unscored’ (default), ‘prequalified’ (only
those that passed the keyword pass, the cheapest useful choice),
‘not_prequalified’, or ‘all’ (re-scores everyone, costs again).
First call (confirm=true) returns a warning with the remaining
credits and starts nothing: tell the user, then call again with
confirm=false. Refused with
icp_not_readywhile the scoring profile is being built. - prospect_ids: only these leads (ids from
list_leads); replaces target.
list_leads(icp_id=...).
manage_icp_leads
Add leads to an ICP by hand (they are kept in it whatever their score, and count as a fit for this ICP), or remove them from it. prospect_ids come fromlist_leads. Returns created or removed.
preview_icp_audience
A random sample of LinkedIn profiles matching some ICP filters, like the calibration step of the app’s ICP form: use it to check that the filters describe the right people beforecreate_icp or
update_icp. Same filter values as create_icp (exclusions are not
available here). limit: 1 to 50. Industry labels containing a comma
cannot be previewed and come back in ignored_industries.
get_leads_summary
Leads quota status: trial state (is_trial, trial_days_remaining, trial_ends_at), monthly quota (leads_monthly_included, leads_consumed_in_period, leads_remaining), top-ups (topup_leads_remaining, topups_detail), and renewal date (period_end). Call this beforedetect_leads if the user asks how many credits
they have left.
get_detection_status
Poll the status of running lead detections (they are async and typically take 2-15 minutes). Returns{in_progress, scoring_in_progress, all_terminal}.
all_terminal: true means every detection is done: the new leads
are available via list_leads.
detect_leads
Detect new leads from the engagement (likes + comments) on one of the user’s LinkedIn posts. post_urn accepts a numeric activity ID, urn:li:activity:…, or the share_urn returned by get_post (urn:li:share:… / urn:li:ugcPost:…). The post must be synced to the connected LinkedIn profile; direct reposts are excluded. A post_not_found error requires correcting the reference or connected profile, not retrying the same call. ⚠️ CONSUMES LEAD CREDITS: 1 credit per prospect scored with at least a Medium ICP fit (level A/B/C; weak D fits are free and discarded). The exact cost is NOT known upfront: every engager matching an ICP gets scored (potentially dozens on a popular post), so never promise a number. ⚠️ OTHER SIDE EFFECTS: a completed detection also:- pushes the qualified leads to the user’s connected external CRMs (Pipedrive/HubSpot/Lemlist/Zapier): an external write that is hard to undo;
- sends a recap email if the user enabled it.
The confirm-step response tells you which apply (
crm_destinations,email_recap_enabled): relay them to the user before confirming.
- First call with confirm=true (default): returns
success: false, warning: 'credits_consumption'with the targeted ICPs, the remaining credits,crm_destinations(enabled CRM push rules; empty list = no CRM push) andemail_recap_enabled. Show all of this to the user and ask them to confirm. - After the user confirms, retry with confirm=false to actually
start the detection (returns
success: truewith a queued payload).
- icp_ids: optional list of ICP ids to score against (from
list_icps). Defaults to all the user’s active ICPs. - Detection runs in the background: poll
get_detection_statusafterwards. Returnserror_type: 'leads_quota_exhausted'(402) when no credits remain. - Re-detecting an already-processed post is a NO-OP until its
engagement has grown: the response comes back with
success: falseandqueued: 0(already_syncedin results[]). Tell the user nothing was launched in that case: do not claim a detection started. - One detection at a time per account: while one runs on another
post, the call returns
error_type: 'detection_in_progress'(409). Do not retry right away: pollget_detection_statusuntilall_terminalis true, then launch the next post. results[]can MIX queued and rejected ICPs (e.g.queued: 2with onealready_syncedentry). Report both to the user: which ICPs were launched and which were skipped, and why.
update_lead
Update a lead’s pipeline fields. At least one field is required.- contact_status: pipeline status slug (see
list_leadsfor the default values; users can customize them). - tags: full replacement of the lead’s tag list.
- comment: free-text note on the lead.
- is_favorite: star/unstar the lead.
list_org_leads
List the leads of the whole team, like the “All” view of the organisation’s Leads page: one item per person, with every team member who holds that lead. Only for admins of a Team organisation. Anyone else getserror_type: 'org_admin_required' (not an org admin) or
'team_org_required' (agency organisation: leads stay per client
account). Members without access to Leads contribute nothing.
Each item: key (the person’s identity across members), profile
(name, headline, company, LinkedIn URL…), holders (one per member
who has this lead: user_id, member_name, prospect_id,
contact_status, tags, comment, is_favorite,
best_qualification, memberships, next_action) and
next_action (the nearest open action across holders). Use a
holder’s prospect_id with get_lead or update_lead and
member_user_id set to that holder’s user_id.
Filters
- member_user_id: only this member’s leads (id from
list_org_members). - icp_id: only leads in this ICP (ids from
list_icps, or from a holder’smemberships).level(A best, C weakest) only applies together withicp_id. - contact_status: pipeline status slug, same values as
list_leads(an untouched lead has no status and is not matched by ‘not_contacted’). - search: free-text match on the lead’s name/headline.
- favorite: True for leads starred by at least one holder.
Pagination
limit (up to 100) and offset count lead ROWS, and a person held
by several members spans several rows: a page can return fewer
items than limit. Continue with offset + limit while has_more
is true. total_people is the number of distinct people matching.
list_lead_exclusions
Read the user’s Leads exclusion list: the people and companies they never want to prospect. An excluded person, or anyone working at an excluded company, is hidden from their leads and never detected again. Use this when the user asks things like:- “Who did I exclude from my leads?”
- “Is Acme in my exclusion list?”
- “Find Jane Doe so I can exclude her”
list(default): the entries, newest first. Each hasid,list(personal, or team: shared by a Team organization),kind(person or company),display_name,subtitle,employees_count,reason(a slug: irrelevant, client, colleague, competitor, partner, friend, acquaintance, or free text),source(manual, csv, from_lead, from_engager, suggested, client_space, or linkedin_inbox when synced from the LinkedIn inbox),hits_count(leads it blocked),can_remove,added_by_name,added_by_me. Filters:list_name,kind,query(name contains, 2 to 80 characters). Page withcursor= the previousnext_cursor. The first page withoutqueryalso returnscountsper list and kind.teamsays whether the account has a team list and is its admin.search:query(a name, 2 to 80 characters) finds companies where the user’s leads work and people (their leads, then LinkedIn). Each result saysalready_excluded(in the target list) andexcluded_in. To exclude a result, call manage_lead_exclusions(action=“add”, text=its profile_url or page_url).list_namepicks the target list.suggestions: the app’s suggestions to exclude the user’s own company (own_company) and agency (own_agency), withmatching_leads. Accept or dismiss with manage_lead_exclusions.
manage_lead_exclusions
Change the user’s Leads exclusion list (people and companies never to prospect). Excluding hides the matching leads right away and keeps them out of every future detection.list_name: personal, or team (the list shared by the user’s Team
organization). Without it, the team list when the user has one,
otherwise the personal list (as in the app); each answer says which
list was written.
Actions:
preview: dry run ofadd, nothing is written. Use it for long or ambiguous inputs and show the usersummary,itemsandleads_to_hidebefore adding.add:text= one entry per line: a LinkedIn profile link (linkedin.com/in/…), a company page link (linkedin.com/company/…), a website domain (acme.com), an email (its domain is excluded), or a name (matched against the user’s own leads: a person, else a company). Orcsv_text= the content of a CSV file (only its LinkedIn link columns are read; pick them withcolumn_roles{header: profile_url | company_url | ignored} when the previewcolumnsshow several). Optionalreason(irrelevant, client, colleague, competitor, partner, friend, or free text, 40 characters at most) andhide_existing(default true: hide the existing matching leads). Lines that need a decision are not written and come back inleft_out:choose(several leads or companies share that name: retry withchoices{“<line>”: “<candidate id>”}) orconfirm_big(a company of more than 5000 employees: ask the user, then retry with {“<line>”: “confirm”}).ignoredlines carry theirreason.exclude_leads:prospect_ids(from list_leads, 500 at most) andmodeperson (the lead) or company (their current employer). A company of more than 5000 employees answersbig_company_confirm: ask the user, then retry withconfirm=true.update_reason:exclusion_idandreason(null clears it).remove:exclusion_id(one entry), orexclusion_ids(500 at most; unknown ids count as removed,refusedcounts team entries the user may not remove). The hidden leads come back. A team entry can be removed by a team admin, or by its author within 15 minutes. Confirm with the user before removing.accept_suggestion/dismiss_suggestion:keyown_company or own_agency (from list_lead_exclusions view=“suggestions”).
get_lead_credit_history
Leads credit history: how the user’s lead credits were used and refilled. 1 credit = 1 lead detected with at least a Medium ICP fit. Returns what get_leads_summary does not:leads_monthly_remaining: what is left of this month’s quota alone (get_leads_summary’sleads_remainingadds the top-ups).cancel_at_period_endandaccess_ends_at: the Leads access was cancelled and ends on that date.blocked_leads_count: leads waiting for credits (they are scored once credits are back; processing them is done in the app).last_30_days:consumedandcreditedcredits, andby_reason(ledger totals per reason, consumption negative).events: the 50 latest credit movements, newest first:at,change(negative = consumed),reason(qualification_llm = a lead detected, refund_qualification_failed, monthly_quota_grant, top_up_purchase = a top-up pack bought or offered) andlabel.
list_crm_connections
Read the connected tools of the Leads page (CRMs and webhooks that receive the user’s leads). A connection is a tool account; a route (destination_id) is a sending rule: where leads go in it and which
go there after each detection.
Views:
connections(default): connections, routes, health (last_test_status,last_delivery_error_kind), and the tools that can be connected.resources:connection_idandkind(Lemlist: campaigns; HubSpot: owners, lead_statuses; Pipedrive: users, labels, fields; ReachBoost: lead_lists, campaigns), read from the tool: ids forroute_config.deliveries:connection_id, optionaldestination_id,status,limit,offset: leads sent by this tool, per-route counts and errors.
manage_crm_connections
Change the connected tools of the Leads page (CRMs, webhooks) and their routes (read with list_crm_connections). Actions:create_connect_link:provider. Returns a link to the app where the user enters the key and tests the account. NEVER ask the user for an API key, token or webhook URL in the chat, and never accept one: give the link (url) and relaymessage_for_user. Then call list_crm_connections when the user says it is done.test:connection_id. Checks the stored credentials with the tool (ok,provider_error).disconnect:connection_id. Also deletes its routes and their delivery history: the first call answersdisconnect_confirm_required; tell the user and only after their explicit yes call again withconfirm=true.create_route:connection_id,route_config, optionallabel,enabled,min_level(A, B or C: lowest level sent automatically),icp_ids(empty = all ICPs),require_email.route_configby tool (ids from list_crm_connections view=“resources”): Lemlist{campaign_id, campaign_name, icebreaker_mode}(icebreaker, key_quote, reasoning or none); HubSpot{owner_id, lead_status}; Pipedrive{owner_id, label_id?, linkedin_field_key?}; ReachBoost{resource_kind, resource_id, resource_name}; webhook{}. Confirm the choice with the user first: new leads will flow there automatically.update_route:destination_idand the fields to change (same as create_route;enabled=falsepauses it).delete_route:destination_id. Confirm with the user first.
send_leads_to_crm
Send leads of this account (prospect_id values from list_leads) to
one route of a connected tool, like the “Send to my tools” action of
the Leads page. Up to 200 leads per call.
Target: destination_id (a route, from list_crm_connections), or
connection_id when that tool has a single active
route (ambiguous_connection otherwise: ask the user which one).
Before anything is queued, each lead is checked: a lead in the user’s
exclusion list (person or company) or already sent to this route is
not sent. The answer lists them in refused with the reason
(excluded, already_sent, not_found): tell the user, never try to
work around an exclusion. Route filters (level, ICP, email) do not
apply: the user chose these leads.
Sending is asynchronous (seconds to a minute). Relay
message_for_user; check results with list_crm_connections
view=“deliveries” or get_lead. Confirm the list of leads and the
destination with the user before calling: leads land in their CRM.
get_team_activity
Read the team activity of the user’s organisation, as the app’s Activity page and team calendar show it. Org admins only. Use this when the user asks things like:- “Who on my team posted this month? Who is inactive?”
- “How regular is each of my clients? Who has nothing scheduled next week?”
- “Show me everything the team has scheduled for the next two weeks”
overview(the Activity page), over a period (start_datetoend_date, YYYY-MM-DD in the user’s timezone, at most 366 days; default the last 30 days), each figure with the previous period of the same length:team: members_count, active_members (a post created in the period), average_posts_created per member, average_active_minutes in the app per member, publications.most_active_members: the top 3 by posts created (the ranking).weekly_active_members: active and inactive members per ISO week.members: one entry per member (sorted bysort: scheduled = upcoming scheduled posts, created, activity = time in the app, name) with posts_created and posts_published (and previous), active_minutes and active_days (regularity), drafts, upcoming_count, next_post and upcoming_posts withinupcoming_horizon, last_activity_date, linkedin_connected, group.include_daily_activity=trueadds the minutes spent in the app for each of the last 30 days.calendar(the aggregated team calendar, every member in one call), fromstart_date(default today) toend_date(default 30 days later, at most 93 days): scheduled and published posts of all members (member, local date and time, preview, media_type, pending_member_validation, stats of published posts), sorted by date, at mostlimit(seetruncated), plus the ideas placed in their calendars (include_ideas).
group_ids (from list_org_groups) and
member_user_ids (from list_org_members); with both, members in
the groups AND in the list.
A restricted admin only sees the members of their scope, and is not
counted in the team figures. Post ids are MagicPost UUIDs for
get_org_member_post (null for posts published outside MagicPost).
list_org_groups
List the member groups of the user’s organisation (departments, subsidiaries, or clients for an agency), with the members of each group and the members without a group. Org admins only. Returnsgroups (id, name, color, member_count, members),
ungrouped_members, can_manage_groups (false for an agency
manager or a restricted admin: they can assign members to existing
groups but not create, rename or delete groups), limits, and
groups_module_enabled (the organisation turned the Groups module
off in the app: groups still exist but are hidden there).
A restricted admin only sees the members of their scope. Use the
group id with manage_org_group or as a filter of
get_team_activity.
No inputs.
manage_org_group
Change the member groups of the user’s organisation, or plan the same post or idea for a whole group, as the app does. Org admins only. Actions:create(name, max 40 characters, unique; optionalcolorhex, from the app palette #7e4efd, #4e9bfd, #4ebb43, #dd7802, #fd4e4e, #e94ec9, #0e9384, #7c7c7c). 50 groups at most.update(group_id,nameand/orcolor): rename or recolor.delete(group_id): its members stay in the organisation, without a group. create, update and delete need full rights (owner or super admin in an agency, any admin in a team): otherwise 403admin_level_forbidden.assign_members(group_id,member_user_ids): move members into the group (a member belongs to one group at most).remove_members(group_id,member_user_ids): take them out of that group. Both return one result per member; a member you cannot see ismember_not_in_org, one above your admin leveladmin_level_forbidden.schedule_post(the team calendar’s “Plan for the team”): the same post (content, max 3000 characters as LinkedIn counts them) scheduled on each target’s own LinkedIn account ondateattime(HH:MM, in each member’s timezone unlesstimezoneis set; a date and time already past is refused). Targets:group_idsand/ormember_user_ids, orall_members=true(the whole team, or your scope), 50 members at most per call (split larger teams by group). Approval: omitrequire_validationto follow each member’s setting (a member in validation mode keeps the post pending until they approve it);require_validation=true: every member must approve;false: approved by you, published as is. Optionalmedia: up to 9 items{url, media_type: image|video|document, thumbnail_url?}, files of your media library only (list_media_library).push_idea: the same idea (content, max 2000 characters) placed ondatein each target’s calendar.client_visible: shown on an agency client’s shared link (default: internal for clients, visible otherwise). Both return one result per member (success,post_idoridea_id,error_typesuch astoken_expired); one failure never stops the others. Not retried: checkresultsbefore calling again, or posts are created twice. Confirm targets, date and time with the user before scheduling.
list_org_members
List the active members of your organisation. Only callable by organisation admins. Returns name, email, status, whether each member is themselves an org_admin, and whether their LinkedIn account is currently connected to MagicPost. Use this first when the user asks anything team-scoped, so you know the set of validmember_user_id values to pass to the other org
tools.
No inputs.
get_org_metrics_summary
Compact analytics for the org or one specific member.- When
member_user_idis omitted: returns one compact summary per team member (name, totals, follower growth, top posts). Use this for “how is the team doing?” questions. - When
member_user_idis set: returns ONE detailed summary for that member, same shape asget_metrics_summaryfor the caller’s own account.
top_n defaults to 3 in team view (response stays token-efficient
for an LLM); set higher when drilling into a single member.
summary.followers.gained is null when LinkedIn did not provide
enough snapshots to cover the whole period. Check follower coverage;
available_range_gained only covers the returned dates.
summary.followers.daily contains profile-level daily gains.
Each top_posts entry carries media_type (image, video,
document, article, poll or text) and thumbnail_url: the post’s
image, the video’s preview frame, the document’s first page or the
article image, as a URL you can embed in a report. It is null for text
and poll posts, and when no image was stored for the post.
Identifiers (IMPORTANT):
top_posts[].linkedin_share_urn is the LinkedIn share URN, NOT the
MagicPost UUID expected by get_post, get_org_member_post,
schedule_post, cancel_scheduled_post, publish_post_now,
schedule_member_post, or create_or_update_post. Passing it to
those tools returns error_type='invalid_post_id_format'.
To act on a top post, resolve the URN to a MagicPost UUID via
list_org_member_posts(member_user_id=..., status="published") and
match the URN against the row’s linked_in_url_post field. Then read
its full record with get_org_member_post. Posts published outside
MagicPost have no MagicPost UUID and cannot be acted on.
list_org_member_posts
List posts across the org, optionally scoped to one member.- When
member_user_idis set: only that member’s posts. Useful for “show me Alice’s drafts” or “what is Bob scheduling next?”. - When omitted: posts grouped by member (each with
limitposts starting atoffset). Use for “what’s the team posting this week?”.
status is the lifecycle filter (draft / scheduled / published),
same semantics as list_my_posts. Members and members’ posts are
returned even if the LLM client doesn’t have a direct relationship
with them: org-admin permission is sufficient.
Each post row carries media_type (image, video, document or
text) and thumbnail_url: the post’s first image, the video’s
preview frame or the document’s cover, as a URL you can embed. It is
null for text posts and when no preview image exists.
Each returned post row exposes its MagicPost UUID as id. To read
ONE post’s full record (full text, media, stats…), pass that id to
get_org_member_post(member_user_id=..., post_id=...), or to
get_post with the same member_user_id (without it, get_post
only reads your own posts and returns post_not_found).
get_org_member_post
Fetch the full record of ONE post owned by a member of your org. Org-admin read of a member’s post, same record asget_post(member_user_id=..., post_id=...). Use this when you already have a member’s post UUID (typically
from list_org_member_posts) and need its full content/metadata
(full text, schedule date, LinkedIn URL, stats, media, etc.). The
record also carries media_type and thumbnail_url, with the same
meaning as in list_org_member_posts.
Only callable by organisation admins. Both arguments are REQUIRED:
member_user_id: the post owner’s user id, exactly as returned bylist_org_members(user_record_id) orlist_org_member_posts. It must be a member of YOUR org.post_id: the MagicPost UUID of the post (e.g. “df1cbd56-a7c0-41f4-b929-5d242bed12eb”), as returned in theidfield bylist_org_member_posts. This is NOT thelinkedin_share_urnfromget_org_metrics_summary: passing a URN returnserror_type='invalid_post_id_format'(400).
list_org_member_posts(member_user_id=..., status=...)→ read the target row’sid.get_org_member_post(member_user_id=..., post_id=<that id>).
error_type='org_admin_required'(403): you are not an org admin.error_type='member_not_in_org'(404):member_user_idis not in your org.error_type='post_not_found'(404): the post does not exist, is deleted, or does NOT belong tomember_user_id(IDOR guard: you cannot read another member’s post by passing the wrong owner).
get_post without member_user_id only reads your own posts and
returns post_not_found for a teammate’s post.
create_member_post
Create a draft owned by a specific organisation member. Only callable by organisation admins. Getmember_user_id from
list_org_members. The returned post_id belongs to that member and
can be passed to schedule_member_post.
To attach media first, call attach_media_to_post with both the
returned post_id and the same member_user_id.
add_member_idea_to_notebook
Save a post idea to the Idea notebook of a specific organisation member, to write later. The idea appears at the top of THAT member’s notebook backlog, like an idea they typed in the app. Only callable by organisation admins. Getmember_user_id from
list_org_members. Use this when the user asks to add an idea to a
client’s / teammate’s notebook: do NOT create a draft post instead.
For the caller’s own notebook, use add_idea_to_notebook. For
several ideas, call the tool once per idea.
Parameters
- idea: the idea itself, short (a topic, an angle, a hook). Max 2000 characters.
- notes: optional longer context kept with the idea (sources, angle, anecdote, outline). Max 100000 characters.
Returns
{success, idea_id, idea, notes, created_at, member_user_id}. The
call is not retried: on a network error, check with the user before
calling again, or the idea may be saved twice.
schedule_member_post
Schedule a post on behalf of an org member. Only callable by organisation admins. The post must belong tomember_user_id (you can’t move someone else’s post by accident).
Defaults:
timezonefalls back to the member’s stored userTimezone (NOT yours). Set it explicitly if you want to schedule in your own timezone instead.at_isois interpreted in that timezone unless the string already has an offset.
schedule_post (same_day_posts /
exact_slot_conflict): computed against the MEMBER’s existing
scheduled posts. Show the warning to the user, then retry with
confirm_*=false to force through.
If the member’s LinkedIn token has expired, the response has
actionable: true with a hint telling you to ASK THE MEMBER to
reconnect: only they can, not you. Surface that hint verbatim.