Skip to main content
Glama

smb-list

Read-only

List files and folders in a Windows SMB share. Optionally recurse into subfolders and filter by file suffixes to find specific files.

Instructions

dbabrain common.cli smb-list: A Windows share and the login to it - what to list, fetch, delete, or store the login for. Request fields (pass them as request):

  • host: The machine sharing it: //host/share. Every command but smb-credential.

  • share: The share's name on that host.

  • username: The login. A domain before it (DOMAIN, then a backslash, then the user) is split off, as Windows writes it. The caller resolves it - common.cli reads no configuration.

  • password: The login's password. Never on a command line: smbclient reads it from a file this command writes 0600 and deletes.

  • domain: The login's domain, when not part of username.

  • backend: smbclient | unc. Default: unc on Windows (the share's own path, after cmdkey), smbclient elsewhere.

  • timeout_seconds: The whole call. Default 600 for a listing or a delete, 3600 for one file.

  • path: smb-list: the folder under the share to list; empty = the share's root.

  • recurse: smb-list: into subfolders (default true).

  • suffixes: smb-list: only file names ending in one of these, case-insensitive (e.g. [".bak", ".trn"]).

  • remote_path: smb-get: the file under the share, backslash- or slash-separated.

  • local_path: smb-get: the file to write on this node; its folder is created.

  • paths: smb-delete: the ONE file to delete, under the share - a list of exactly one path, never a pattern or a folder; two or more are refused.

  • force: smb-delete: must be true - a share has no host to hash a file on, so this is the forced delete of one stray file.

  • target: smb-credential: the host whose UNC paths the stored login opens.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "smb-list"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.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=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds meaningful behavior beyond that: backend selection (unc on Windows after cmdkey, smbclient elsewhere), default timeout of 600s for listings, recurse defaulting to true, suffix filtering, and the note that passwords are written to a 0600 file and deleted rather than passed on a command line.

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

Conciseness3/5

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

The text is dense and front-loaded with a family-level sentence, but roughly half of the field list (remote_path, local_path, paths, force, target) belongs to sibling commands and is noise for a caller of smb-list. It is well organized as a field glossary yet oversized for this single tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be described, and the request shape is thoroughly documented with defaults. The main residual gap is error/edge behavior — what happens on an unreachable host, bad credentials, or a nonexistent path — which matters for an open-world network tool.

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

Parameters4/5

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

The schema exposes only an opaque 'request' object with additionalProperties and 0% description coverage, so the description carries the full burden — and it largely does, defining host, share, username (with DOMAIN\user splitting), password, domain, backend, timeout_seconds, path, recurse and suffixes with formats and defaults. It loses a point because the field list is a shared multi-command block, forcing the agent to sift out which entries apply to smb-list.

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

Purpose3/5

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

The opening line ('A Windows share and the login to it - what to list, fetch, delete, or store the login for') describes an entire command family rather than this tool specifically. Only later, in the field list ('path: smb-list: the folder under the share to list'), does it become clear that smb-list enumerates files on an SMB share. The verb+resource is recoverable but not stated up front.

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?

Routing guidance is implicit: fields are prefixed with 'smb-get:', 'smb-delete:', 'smb-credential:', which signals that those siblings serve fetch, delete and credential storage respectively. However, there is no explicit statement of when to choose smb-list versus alternatives (e.g., list-files, list-backup-files) and no stated prerequisites or exclusions.

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

Deploy Server

Other Tools