Skip to main content
Glama

get_article_blocks

Получить блоки статьи с применёнными фильтрами. Фильтры search и types комбинируются логическим И (блок должен удовлетворять обоим). Внутри search используется OR по подстрокам. Параметры blocks_before/blocks_after добавляют к каждому совпадению соседние блоки как контекст (аналогично grep -B/-A): окна пересекающихся совпадений мержатся, выход за границы статьи игнорируется, порядок ответа — исходный порядок статьи. Возвращает массив подходящих блоков (совпадения вместе с контекстом) и общее количество blocksCount (только совпадения, без контекста).

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": {
      "article_id": "<article_id>"
    },
    "name": "get_article_blocks"
  }
}

Input Schema

NameRequiredDescriptionDefault
typesNoРазрешённые типы блоков. Пустой список или None — без фильтра по типу.
searchNoМассив подстрок для поиска (OR между элементами). Блок проходит фильтр, если хотя бы одна подстрока встречается в любом строковом значении внутри поля data блока (рекурсивно — в text, code, caption, items[].content, content[][] таблицы, file.url и т. д.). Сравнение регистронезависимое. Пустые строки игнорируются.
variantNofull — блоки целиком; meta — только служебные поля id, type, hash, updatedAt (без data). meta применяется поверх результата с контекстом — у всех вернувшихся блоков (и совпадений, и контекстных) останутся только служебные поля.full
article_idYesИдентификатор статьи
blocks_afterNoСколько блоков после каждого совпадения добавить в ответ как контекст. 0 — без контекста (по умолчанию).
blocks_beforeNoСколько блоков до каждого совпадения добавить в ответ как контекст. 0 — без контекста (по умолчанию).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses window merging of overlapping matches, clipping at article boundaries, that output preserves original article order, and that blocksCount excludes context blocks. These are non-obvious behaviors an agent could not infer from the schema.

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?

Four sentences, each carrying distinct information: filter logic, context-window semantics, and return shape. No restatement of the tool name or filler.

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?

The tool has an output schema, so return values need not be explained, and every parameter's interaction and edge behavior (boundary clipping, merging, ordering, count semantics) is covered. Nothing an agent needs to invoke it correctly is missing.

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 already 100%, so the baseline is 3, but the description adds cross-parameter semantics the schema does not state – how search and types combine (AND), how substrings combine (OR), and that context windows merge rather than duplicate. It does not re-describe variant or article_id, which is fine since the schema does.

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

Purpose4/5

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

The description states a concrete verb and resource ('Получить блоки статьи с применёнными фильтрами') and spells out that it returns matching blocks plus a blocksCount. It distinguishes itself implicitly from siblings like get_article (whole article) and count_article_blocks (count only), but never names them explicitly.

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 describes the filtering model (search AND types, OR within search) and when the blocks_before/blocks_after context parameters are useful, drawing an explicit grep -B/-A analogy. It stops short of stating when to prefer get_article or count_article_blocks instead.

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