Skip to main content
Glama

Search in Document

search_in_document
Read-onlyIdempotent

Search terms or phrases across PDF, DOCX, XLSX, and CSV files to locate matches and return ranked snippets with page, paragraph, sheet, or row locations.

Instructions

Mencari istilah/frasa dalam PDF, DOCX, XLSX, dan CSV. Mengembalikan snippet berperingkat dan lokasi halaman/paragraf/sheet/baris.

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": {
      "filePath": "<filePath>",
      "query": "<query>"
    },
    "name": "search_in_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes
filePathYesAbsolute path file di dalam salah satu direktori ALLOWED_DIRS.
maxResultsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare a safe, idempotent, closed-world read, so the description correctly avoids restating safety. It adds genuine behavior beyond the annotations by disclosing the return shape: ranked snippets and location granularity per format (page/paragraph/sheet/row). It omits ranking criteria and no-match behavior, but the core behavioral picture is there.

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 short sentences with no filler: capability and return value are front-loaded in that order. Every clause carries information; nothing is repeated from the annotations or title.

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?

With no output schema, the description is appropriately responsible for return values and does describe them, but only at a high level. Missing pieces for a search tool include match semantics for the required query parameter, ranking rationale, and empty-result behavior, leaving an agent to guess how queries are interpreted.

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

Parameters2/5

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

Schema description coverage is only 33% — only filePath is documented in the schema (ALLOWED_DIRS constraint). The description mentions 'istilah/frasa' but never clarifies matching semantics (exact phrase, case sensitivity, multi-word behavior) for query, and never mentions maxResults or what its default/limits imply for ranking. With low coverage the description should compensate, and it largely does not.

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?

States a clear verb and resource ('Mencari istilah/frasa') plus the exact supported formats (PDF, DOCX, XLSX, CSV), so an agent knows precisely what operation is performed. It does not explicitly distinguish itself from siblings like read_pdf or get_document_info, which is the only thing separating it from a 5.

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

Usage Guidelines3/5

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

Usage is implied by the verb 'mencari' and the supported format list, but there is no explicit statement of when to prefer this over read_pdf/read_word or get_document_info. No exclusions, prerequisites, or alternative routing are provided.

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