Skip to main content
Glama

sftp_ler

Read-only

Reads text files from SFTP servers by profile and path, starting at a line and returning up to a line or byte limit; specify encoding or auto-detect UTF-8/CP1252, and get metadata for binary files.

Instructions

Le um arquivo de texto do servidor, a partir de linha_inicial, ate max_linhas ou o limite de bytes do perfil. encoding vazio detecta UTF-8 e cai para CP1252; informe para forcar (ex.: "cp1252"). Arquivo binario devolve so os metadados.

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": {
      "perfil": "<perfil>",
      "caminho": "<caminho>"
    },
    "name": "sftp_ler"
  }
}

Input Schema

NameRequiredDescriptionDefault
perfilYes
caminhoYes
encodingNo
max_linhasNo
linha_inicialNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly, non-destructive, and open-world access. The description adds genuine behavioral detail beyond that: truncation by line count or the profile's byte limit, automatic UTF-8 detection with CP1252 fallback, and the non-obvious fact that binary files return only metadata rather than content.

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

Conciseness4/5

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

Three tight sentences with no filler, front-loading the read operation before the encoding and binary-file caveats. The awkward line break and the parenthetical example are minor blemishes only.

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 read tool with no output schema, the description covers behavior well (truncation, encoding, binary handling) but leaves the required 'perfil' parameter undefined and does not say whether the response signals that the byte/line limit was hit.

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 0%, so the description carries real weight and does explain encoding (empty vs. forced) and the roles of linha_inicial and max_linhas. However, 'perfil' — the key required parameter identifying which connection to use — is never defined, and the byte limit is only referenced as coming from the profile without saying how it is set.

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 specific verb and resource: reads a text file from the remote server, with a line-range scope (linha_inicial to max_linhas). That scope implicitly separates it from siblings like sftp_ultimas_linhas (tail) and sftp_buscar (search), though no sibling is named explicitly.

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 line-range read semantics, and there is useful guidance on when to set encoding (only to force a specific charset). There is no explicit when-to-use/when-not guidance and no routing to sftp_baixar for whole-file transfer or sftp_buscar for content search.

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