Skip to main content
Glama

Search Codeforces problems

search_problems
Read-onlyIdempotent

Search the official Codeforces problemset by ID, title, tag, or rating, including multi-token queries like 'dp 1500', to find matching problems without scraping codeforces.com.

Instructions

Search the official Codeforces problemset by problem id ('158A', '158/A'), title, tag ('dp', 'greedy', 'binary search') or rating ('1500', '1200-1600'). Multi-word queries must match every token, so 'dp 1500' returns 1500-rated dynamic programming problems. Prefer this over scraping codeforces.com.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_problems"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax results (default 10).
queryYesFree-text query: id, title, tag, or rating.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered elsewhere. The description adds genuinely useful search behavior (all tokens must match), but says nothing about result ordering, truncation beyond the limit, or what an empty match looks like.

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 scope, then the matching rule and a routing hint. Every clause carries information; the parenthetical examples do real work disambiguating id/tag/rating formats.

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

Completeness3/5

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

There is no output schema, so the description is the only place an agent could learn what a result looks like (problem id, title, tags, rating, URL), and it stays silent. For a read-only search with a trivial input schema this is the one material gap; query semantics are otherwise fully covered.

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 baseline is 3, but the description goes beyond the schema's terse 'Free-text query' by specifying the four accepted query kinds and the rating-range syntax ('1200-1600'). The limit parameter is left entirely to the schema, which is fine since it is fully documented there.

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 ('Search the official Codeforces problemset') and then enumerates the accepted query forms with concrete examples ('158A', '158/A', 'dp', '1500', '1200-1600'). An agent can immediately tell this is a filtered search over problems rather than a listing or user-stats tool.

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 multi-token AND semantics with a worked example ('dp 1500'), which tells the agent how to compose queries rather than issue several. It also steers away from scraping codeforces.com, but gives no explicit guidance on when to prefer a sibling like list_problems over this call.

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