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)
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. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true, so the description carries the behavioral burden and exceeds it. It discloses the recency window, response status semantics, exclusion of reshares and quote-posts, credit costs, the large-batch gate, and the skipped_profiles_due_to_credits behavior. This is far more than typical and gives the agent an accurate mental model.

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?

The description is long, but it is well-structured with clear sections and every major paragraph serves a functional purpose: usage, recency semantics, batching, cost, and return shape. It is denser than strictly necessary, especially around cost and the large-batch gate, but the structure and front-loading keep it navigable.

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 description fully compensates by documenting the return keys, status values, and engagement-count semantics. It also covers failure modes, credit limits, approval policy, batching constraints, and profile URL input rules. An agent has everything needed to call this tool correctly and interpret its results.

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 description coverage is 100%, so the baseline is 3, but the description adds meaningful semantic context beyond the schema. It explains the credit cost formula, when large_batch_approved may be set, how profile_input maps responses to requested URLs, and why unresolvable_profiles are not charged. Some details like limit defaults are only in the schema, but the added context justifies a score above baseline.

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

Purpose5/5

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

The description opens with a specific verb and resource: fetch recent LinkedIn posts from one or more profiles using Apify. It further distinguishes this tool from post-history tools and from fetch_post_engagers by emphasizing the recency window and noting that engagement counts are not the people who engaged. This makes the tool easy to separate from siblings even without opening schemas.

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?

It explicitly states when to use the tool: to check what someone posted recently and to personalize outreach off something they actually said. It gives clear when-not guidance by saying this is not for post history, by warning against widening posted_within_days unless asked, and by naming fetch_post_engagers as the alternative for the actual list of engagers. The ALWAYS BATCH instruction also gives concrete operational guidance.

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