Skip to main content
Glama

Get Linkedin Posts

get_linkedin_posts
Read-only

RECENCY WINDOW: only posts from the last posted_within_days days (default 7) are returned — this tool answers "what has this person posted lately", not "show me their post history". A profile with nothing in that window comes back with profiles[<key>]['status'] == 'no_recent_posts' and no posts for that profile — that is normal and does not mean the lookup failed. In that case, personalize off the prospect's role, company, or headline instead of forcing a stale post reference; do not widen posted_within_days just to find something to quote unless the user asked for older posts specifically.

Only the profile's own original posts count as "recent activity" — reshares and quote-posts are excluded.

ALWAYS BATCH: pass every profile URL in ONE call — batching is both cheaper and faster than one call per profile. Up to 1000 profiles per call; split a larger list across calls. Each returned post carries a profile_input field identifying which profile it came from (the matched input identifier).

COST: 0.02 credits per unique scrapeable profile searched, PLUS 0.5 credits for each profile that actually has a post in the window. If the user has fewer credits than profiles, only the affordable first profiles are looked up and the rest are reported in skipped_profiles_due_to_credits.

LARGE-BATCH COST GATE: because each profile can cost up to 0.52 credits, a call that would search more than 100 profiles is refused with a ModelRetry that states the exact credit cost, UNLESS large_batch_approved=True is passed. Set large_batch_approved=True ONLY after the user has seen the credit cost and agreed to it — in interactive chat, that means you told them the number and they said yes; in stored trigger code, ONLY if the user explicitly approved this recurring spend when the trigger was set up. Do not set it reflexively to silence the retry. A dict with the following keys.

  • posts: list of {url, text, author, posted_at, days_ago, profile_input, reactions, comments} — newest-first per profile. reactions/comments are engagement COUNTS, not the people who engaged — use fetch_post_engagers for the actual list of people.

  • total: number of posts returned.

  • profiles: dict keyed by the normalized profile identifier (the same value as each of that profile's post's profile_input), each {'status': 'ok'|'no_recent_posts'|'not_found', 'posts': int} — covers every attempted or cached profile. not_found means the actor could not resolve the target (renamed/private/deleted); no_recent_posts means it resolved but nothing fell in the window. (Distinct from the top-level unresolvable_profiles list below, which is inputs rejected at URL classification and never sent to the actor.)

  • posted_within_days, profiles_lookup_count, credits_charged, and optionally skipped_profiles_due_to_credits / warning / unresolvable_profiles.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax posts per profile (default 3, max 5)
on_behalf_ofNoAn agency client's email, from list_agency_clients, to run this call in that client's account: their agents, settings, connected accounts, and credits. Omit it to act on your own account.
linkedin_urlsYesList of PUBLIC profile URLs (linkedin.com/in/<slug>) or bare usernames, e.g. ["https://linkedin.com/in/johndoe", "janedoe"]. Sales Navigator URLs (linkedin.com/sales/lead/...) and company URLs are NOT scrapeable — they are skipped and reported in `unresolvable_profiles`, and are NOT charged. If you only have a Sales Navigator URL, resolve a public /in/ URL first (e.g. via Apollo) before calling this.
posted_within_daysNoOnly return posts published in the last N days (default 7).
large_batch_approvedNoConfirm a lookup above the cost-gate threshold. Only set True once the user has seen and approved the credit cost (see the LARGE-BATCH COST GATE note above).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / on_behalf_of
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "An agency client's email, from list_agency_clients, to run this call in that client's account: their agents, settings, connected accounts, and credits. Omit it to act on your own account."
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations carry only readOnlyHint, and the description goes well beyond it: the recency window semantics, exclusion of reshares/quote-posts, `no_recent_posts` vs `not_found` handling, per-profile credit cost and gate, ModelRetry refusal behavior, and skipped-profiles outcome. This is exactly the behavioral context annotations alone cannot supply.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with a one-line purpose and organized under labeled sections (RECENCY WINDOW, ALWAYS BATCH, COST, LARGE-BATCH COST GATE) with a returns block. It is long, and the cost-gate rule is restated in both the body and a parameter description, but for a tool with this many behavioral constraints the length is largely earned.

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

Completeness5/5

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

There is no output schema, but the embedded <returns> block fully documents the return shape (posts, total, profiles statuses, credits, skipped profiles) and even clarifies a subtle distinction between `profiles[].status` and top-level `unresolvable_profiles`. Nothing an agent needs to call this correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: the cost-gate mechanics for `large_batch_approved`, the 'do not widen' guidance for `posted_within_days`, and the profile_input batching rationale for `linkedin_urls`. The schema even back-references the description's cost-gate note, so this adds genuine value.

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

Purpose5/5

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

States a specific verb+resource ('Fetch recent LinkedIn posts from one or more profiles') and immediately scopes it against the broader reading of 'post history'. It also names the sibling relationship, pointing to `fetch_post_engagers` for engagement details, so an agent can distinguish it without opening any schema.

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

Usage Guidelines5/5

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

Explicitly states when to use it ('to personalize outreach off something they actually said'), how to batch ('pass every profile URL in ONE call'), and when-not (do not widen `posted_within_days` just to find something to quote; do not set `large_batch_approved` reflexively). It also routes the engager-list need to the correct sibling.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources