Skip to main content
Glama

local_map

Apply the same instruction to each file in a batch to classify, extract fields, or detect patterns. Returns a result per file using a local model to reduce cloud token usage.

Instructions

Applique la MEME instruction a chaque fichier separement et renvoie un resultat par fichier. Pour le traitement par lot : classer des fichiers, extraire un champ de chacun, detecter un motif dans une arborescence. Traitement sequentiel (le GPU ne parallelise pas utilement) — compter quelques secondes par fichier.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoRepertoire de base.
modelNoDefaut : code.
patternsYesGlobs des fichiers a traiter.
max_filesNoGarde-fou. Defaut : 40.
max_tokensNoLongueur max par fichier. Defaut : 400.
instructionYesInstruction appliquee a chaque fichier individuellement.
Behavior4/5

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

With no annotations, the description fully covers behavior: it states the operation is sequential, not parallelizable by GPU, and estimates seconds per file. It also mentions returning a result per file. This is good transparency, though it doesn't detail side effects or error handling.

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?

The description is relatively compact, with three sentences: main purpose, examples, and performance note. It starts with the core function, so it's well front-loaded. Could be slightly more concise, but overall efficient.

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?

Given 6 parameters and no output schema, the description covers the core purpose and performance but does not specify the output format or structure (e.g., how results per file are returned). It is adequate for basic use but incomplete for an agent needing to parse results.

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 coverage is 100%, so the description does not need to add much. It repeats the 'instruction' purpose from the schema but adds no new meaning. The description does not elaborate on patterns, cwd, model, max_files, or max_tokens beyond what the schema already provides.

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

Purpose5/5

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

The description clearly states that local_map applies the same instruction to each file separately and returns one result per file. It provides specific examples like classifying files, extracting a field, and detecting patterns, which helps distinguish it from siblings like local_digest, local_ask, and local_status.

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 description gives clear use cases (batch processing, classification, extraction) and performance characteristics (sequential, seconds per file). However, it does not explicitly state when not to use this tool or compare it to alternatives, so it lacks exclusion guidance.

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/drangoht/local-llm-mcp'

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