Skip to main content
Glama

Convert Document

convert_document

Converts PDF, DOCX, XLSX, or CSV files to a chosen target format and writes the new file to an allowed output directory.

Instructions

Membaca PDF/DOCX/XLSX/CSV lalu menulis versi baru dalam format target (pdf/docx/xlsx/csv) ke ALLOWED_OUTPUT_DIRS. Konversi berbasis teks; format kaya tidak dipertahankan.

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": {
      "sourcePath": "<sourcePath>",
      "fileName": "<fileName>",
      "targetFormat": "<targetFormat>"
    },
    "name": "convert_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNameYesNama file tujuan (basename saja) di dalam ALLOWED_OUTPUT_DIRS.
overwriteNo
sheetNameNo
sourcePathYesAbsolute path file di dalam salah satu direktori ALLOWED_DIRS.
targetFormatYes

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 readOnlyHint=false, destructiveHint=false, idempotentHint=false, and openWorldHint=false, so the bar is lower. The description still contributes real behavioral context beyond them: conversion is text-only, rich formatting is lost, and output is confined to ALLOWED_OUTPUT_DIRS. What it omits is the collision behavior implied by the overwrite flag and idempotentHint=false — the agent cannot tell from the description whether an existing target file is replaced, rejected, or versioned.

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 dense sentences with no filler; the core action and destination come first and the fidelity caveat follows immediately. Every clause carries information an agent needs.

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?

For a 5-parameter write tool with no output schema and only 40% schema coverage, the definition covers the conversion semantics and fidelity limit but leaves key gaps: overwrite behavior, the meaning and applicability of sheetName, and whether the source must exist/be readable. Adequate to call, but not sufficient to call safely in collision cases.

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 40%, so the description must compensate and largely does not. It restates the target format set and the output directory rule (already partly in the fileName and sourcePath schema descriptions), but says nothing about overwrite — a boolean that determines whether existing data is replaced — nor about sheetName, which is presumably only meaningful for xlsx sources/targets.

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?

"Membaca PDF/DOCX/XLSX/CSV lalu menulis versi baru dalam format target (pdf/docx/xlsx/csv) ke ALLOWED_OUTPUT_DIRS" gives a clear verb pair (read then write), the resource, the supported input formats, and the destination constraint. It is clearly a format-conversion tool rather than a content-creation tool, which implicitly separates it from siblings like create_docx or create_pdf, but it never names or explicitly contrasts those siblings.

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?

"Konversi berbasis teks; format kaya tidak dipertahankan" effectively states a when-NOT condition: if rich formatting must survive, this tool is the wrong choice. However there is no positive guidance on when to prefer this over the create_* or read_* siblings, nor any stated prerequisites (source must reside inside ALLOWED_DIRS).

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