Skip to main content
Glama

Compare posts by views

compare_posts
Read-onlyIdempotent

Read 2 to 10 public posts (YouTube and TikTok can be mixed) and rank them by views, with likes per 1,000 views for each. Every row has the same fields as get_post_stats; a post that could not be read stays in the list with its error, ranked last.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "urls": [
        "https://youtu.be/_0G4OG39XjI",
        "https://www.youtube.com/watch?v=_0G4OG39XjI"
      ]
    },
    "name": "compare_posts"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlsYes2 to 10 post addresses. Address of one public post: a YouTube video or Short (youtube.com/watch?v=<id>, youtube.com/shorts/<id>, youtu.be/<id>, or the bare 11-character video id) or a TikTok video (tiktok.com/@user/video/<id>, tiktok.com/video/<id>, or a vm.tiktok.com or vt.tiktok.com short link). Platforms can be mixed.

Output Schema

NameRequiredDescriptionDefault
topNo
as_ofYesISO 8601 time the data was published by its source or fetched from it. A cached answer keeps the time of its fetch.
notesNo
postsYes
sourceYesWho the data comes from, to cite and to check it against.
ranked_byYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / posts / items / properties / tags
      Added value: +{
      +  "items": {
      +    "properties": {
      +      "hashtag_id": {
      +        "type": "string"
      +      },
      +      "tag": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "tag"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / urls / description
      Previous value: -"2 to 10 post addresses. Address of one public post: a YouTube video or Short (youtube.com/watch?v=<id>, youtube.com/shorts/<id>, youtu.be/<id>, or the bare 11-character video id) or a TikTok video (tiktok.com/@user/video/<id>). Platforms can be mixed."New value: +"2 to 10 post addresses. Address of one public post: a YouTube video or Short (youtube.com/watch?v=<id>, youtube.com/shorts/<id>, youtu.be/<id>, or the bare 11-character video id) or a TikTok video (tiktok.com/@user/video/<id>, tiktok.com/video/<id>, or a vm.tiktok.com or vt.tiktok.com short link). Platforms can be mixed."
  3. Changed1 schema field changed
    • changedInput schema / properties / urls / description
      Previous value: -"2 to 10 post addresses. Full address of one public post: a YouTube video or Short, or a TikTok video. Platforms can be mixed."New value: +"2 to 10 post addresses. Address of one public post: a YouTube video or Short (youtube.com/watch?v=<id>, youtube.com/shorts/<id>, youtu.be/<id>, or the bare 11-character video id) or a TikTok video (tiktok.com/@user/video/<id>). Platforms can be mixed."
  4. Changed2 schema fields changed
    • changedInput schema / properties / urls / description
      Previous value: -"2 to 10 post addresses. Full address of one public post: a YouTube video or Short, a TikTok video, or an X post. Platforms can be mixed."New value: +"2 to 10 post addresses. Full address of one public post: a YouTube video or Short, or a TikTok video. Platforms can be mixed."
    • changedOutput schema / properties / posts / items / properties / platform / enum
      Previous value: -[
      -  "youtube",
      -  "tiktok",
      -  "x"
      -]New value: +[
      +  "youtube",
      +  "tiktok"
      +]
  5. Changed3 schema fields changed
    • addedOutput schema / properties / as_of
      Added value: +{
      +  "description": "ISO 8601 time the data was published by its source or fetched from it. A cached answer keeps the time of its fetch.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / source
      Added value: +{
      +  "description": "Who the data comes from, to cite and to check it against.",
      +  "properties": {
      +    "name": {
      +      "type": "string"
      +    },
      +    "url": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "name",
      +    "url"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "ranked_by",
      -  "posts"
      -]New value: +[
      +  "ranked_by",
      +  "posts",
      +  "as_of",
      +  "source"
      +]
  6. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and openWorld, so the basic safety profile is covered. The description adds genuinely useful behavior beyond that: likes per 1,000 views is a derived metric, and a failed post is retained in the output with its error and sorted last rather than dropped. It doesn't mention rate limits or latency, but for a read-only tool the failure semantics are the main thing an agent needs.

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

Conciseness5/5

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

Two sentences, front-loaded with the verb and scope, then the ranking metric and the error-row rule. Every clause conveys something an agent would otherwise have to guess, and nothing is repeated wastefully.

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?

With one required parameter, full schema coverage, a complete annotation set, and an output schema to describe return shape, the description covers what remains: the ranking metric, platform mixing, and failure handling. Nothing needed to select or invoke the tool correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100%, and the urls property already spells out the accepted URL formats, the 2-10 count bounds, and that platforms can be mixed. The description only restates the count and mixing rule, adding the word "public" which hints that non-public posts will fail, but provides no syntax or format detail beyond the schema. Baseline 3 applies when the schema carries the parameter documentation.

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 ("Read 2 to 10 public posts"), states the platforms, and names the exact operation performed ("rank them by views, with likes per 1,000 views"). It also relates itself to the sibling get_post_stats by saying rows share its fields, so an agent can distinguish the multi-post ranking tool from the single-post stats tool without opening either schema.

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

Usage Guidelines4/5

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

It clearly frames the use case: comparing 2 to 10 posts, with YouTube and TikTok mixed freely, and points at get_post_stats as the field reference. It stops short of an explicit contrast ("for a single post, use get_post_stats instead"), so the alternative is implied rather than stated, but the context for invoking it is unambiguous.

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.