Skip to main content
Glama

knowledge_get_chunks_count

Retrieve the total number of chunks in a knowledge base datasource by its IDs to verify indexing volume and monitor content size.

Instructions

Get total chunk count

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": {
      "knowledge_id": "<knowledge_id>",
      "datasource_id": "<datasource_id>"
    },
    "name": "knowledge_get_chunks_count"
  }
}

Input Schema

NameRequiredDescriptionDefault
knowledge_idYesKnowledge base ID or key
datasource_idYesDatasource ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

C2.5/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden and delivers almost nothing. 'Get ... count' implies a read, but it does not confirm read-only semantics, whether the count is affected by filters or permissions, or how expensive the call is. For a tool with zero annotation coverage, that is a substantial disclosure gap.

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

Conciseness3/5

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

At four words it is certainly concise and front-loaded, with no wasted phrasing. But the brevity crosses into under-specification rather than efficiency; a single clause about the count's scope would have cost little and resolved the main ambiguity.

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

Completeness2/5

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

This is a simple two-parameter read tool whose parameters are fully covered by the schema, which keeps the bar low. Still, there is no output schema, so the return value (presumably an integer count, but possibly an object) is undocumented anywhere in the definition.

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 both parameters are documented inline, so the baseline of 3 applies. The description adds no meaning beyond the schema — in particular it does not explain how knowledge_id and datasource_id combine to scope the count.

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

Purpose3/5

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

The description names a verb ('Get') and a resource ('chunk count'), so the basic operation is identifiable. However, it never states the scope of the count — chunks within the given datasource, within the whole knowledge base, or across both required IDs — which is the main ambiguity an agent would need resolved. It also gives no differentiation from nearby tools like knowledge_list_chunks_paginated, which likely also exposes totals.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no mention of alternatives such as list_chunks_paginated, and no conditions or prerequisites stated. The agent must infer usage entirely from the tool name.

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