Skip to main content
Glama

search_posts

Read-onlyIdempotent

Find posts whose title or body matches a query, optionally filter by user, and return post titles, IDs, user IDs, and total match count.

Instructions

Find posts whose title or body contains the query, with a match count.

    - query: case-insensitive text; empty matches every post.
    - user_id: only this user's posts (get it from list_users).
    Returns title, post id and user id; rows are capped at 50, the match count is not.
    

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_posts"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryNo
user_idNonumeric user id from list_users

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent, and non-destructive behavior. The description adds valuable operational context: returned fields, a 50-row cap, and the fact that the match count is not capped.

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?

The main purpose is front-loaded, followed by compact parameter bullets and a short return/cap note. There is no filler.

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

Completeness4/5

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

With no output schema, the description must disclose return values, and it does so along with the cap/count distinction. It omits ordering or pagination beyond the 50-row cap, a minor but real gap.

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

Parameters5/5

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

Adds meaning beyond the schema for both parameters: query is case-insensitive and empty matches all posts, while user_id restricts results to one user and can be sourced from list_users.

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 ('Find'), resource ('posts'), matched fields ('title or body'), and result scope ('match count'). The resource cleanly distinguishes it from search_docs, list_users, and list_todos.

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?

Explains the search context, the empty-query edge case, and where to get user_id. It does not explicitly state when to prefer this over sibling tools or when not to use it.

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

Deploy Server

Other Tools