Skip to main content
Glama

Query Linkedin Posts

query_linkedin_posts
Read-only

Use this to answer "which of my posts performed best?", "what's my average engagement?", "show me posts from last month", etc. This is the account-global table, with no agent/monitor dimension — for the feed a specific agent's monitors discovered (and to act on it), call query_monitored_posts.

Columns: id, social_id, text, share_url, posted_at, impressions, reactions, comments, reposts, is_own_post, author_name, author_headline, fetched_at, created_at, plus a derived engagement_rate string (reactions+comments+reposts over impressions, matching the UI) — '0.0' for posts with no impression data (e.g. third-party posts). The engagement_rate is computed after the query runs, so it can't appear in where_clause or order_by; filter and sort on the raw columns instead. Dict with count, truncated, and posts array (each row carries the columns above plus the derived engagement_rate).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNodefault 25, max 200.
offsetNoRows to skip for paging (default 0). When the result is truncated, re-call with offset += limit for the next page.
order_byNodefault "posted_at DESC". For top performers: "impressions DESC".posted_at DESC
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.
where_clauseNoSQL WHERE. Examples: "posted_at >= NOW() - INTERVAL '30 days'" "impressions > 1000" "text ILIKE '%hiring%'" "is_own_post = false"1=1

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?

The description goes well beyond readOnlyHint: it discloses the refresh cadence (metrics refreshed daily M-F), the semantic meaning of is_own_post and where third-party author data lives, and the non-obvious constraint that the derived engagement_rate is computed after the query runs so it cannot appear in where_clause or order_by. It also explains truncation and the offset += limit paging pattern. This is exactly the behavioral context annotations cannot carry.

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 summary block is front-loaded with the scope statement first, then usage examples, then the sibling pointer, then the caveats — a sensible information hierarchy. It is long and the column enumeration borders on redundant with the returns block, but nearly every sentence carries operational value.

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?

Although there is no formal output schema, the description includes a returns block describing count, truncated, and the posts array with the derived engagement_rate. Combined with the column list, paging guidance, and account-scoping note for on_behalf_of, an agent has everything needed to call and interpret this correctly.

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 on top: it explains the derived engagement_rate cannot be used in where_clause or order_by and that raw columns must be filtered/sorted instead, which directly constrains two of the five parameters. It also implies order_by choices (top performers) that the schema only partially covers.

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 and resource ('Query the LinkedIn posts the user tracks') and immediately scopes what is included: own posts plus third-party posts registered via fetch_post_engagers, with is_own_post as the discriminator. It explicitly contrasts itself with query_monitored_posts, so an agent can route between the two account-global vs. agent-scoped tables 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?

Gives concrete triggering questions ('which of my posts performed best?', 'what's my average engagement?') and states the when-not condition plus the named alternative: for the feed a specific agent's monitors discovered, call query_monitored_posts. That is explicit use/avoid guidance tied to a 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