Skip to main content
Glama

aya_arquivo_substituir_literal

Replace literal text in a file only when the occurrence count is exactly as expected, automatically creating a backup and log.

Instructions

Substitui texto somente quando a contagem de ocorrencias e exatamente a esperada; cria backup e log automaticamente.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeloNomodelo-desconhecido
motivoNosubstituicao literal segura
caminhoYes
procurarYes
substituirYes
ocorrenciasEsperadasNo
Behavior4/5

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

With no annotations, the description carries the behavioral burden and discloses two important side effects: it automatically creates a backup and a log, and it refuses to substitute unless the count matches exactly. It stops short of saying what happens on mismatch, where the backup/log are written, or whether the substitution is atomic, but the main safety behavior is clear.

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?

A single well-organized sentence front-loads the operation and guard, then states the automatic side effects. Every clause earns its place; there is no filler, repetition, or buried detail.

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 6-parameter mutation tool with no annotations, no output schema, and zero parameter descriptions, the description is adequate but not complete. It covers the core safety behavior, but an agent still does not know the mismatch behavior, the return/confirmation format, or the meaning of optional fields such as modelo and motivo.

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 must compensate. It adds meaning to the core parameters by connecting 'substitui texto' and 'contagem de ocorrencias' to procurar, substituir, and ocorrenciasEsperadas, but it leaves caminho, modelo, and motivo unexplained and does not clarify the 'literal' semantics of the search.

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 operation — replacing text only when the occurrence count is exactly the expected one — and advertises automatic backup and logging, making it clear this is a guarded literal replacement on a file. It is specific enough to be distinguished from broader write/edit siblings by its guard, though it does not explicitly name an alternative or mention 'literal' in the prose.

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?

The phrase 'somente quando a contagem de ocorrencias e exatamente a esperada' gives the agent a concrete decision rule: use this tool when an exact expected occurrence count is known, because it will not substitute otherwise. It provides clear context, but it does not explicitly route to alternatives or say when to prefer a sibling like aya_arquivo_escrever_seguro.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/testesvibecodeing/AyA-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server