Skip to main content
Glama

List workspace code files

list_files
Read-only

Lists a workspace's code files and their sizes so you can see what exists before reading or writing one, instead of fetching the entire workspace.

Instructions

Lists the workspace's code files with their sizes — names only, no content. Use it to see what exists before reading or writing one, instead of pulling the whole workspace to find out.

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": {
      "workspaceId": "<workspaceId>"
    },
    "name": "list_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
workspaceIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.53.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so safety is covered; the description adds the substantive behavioral fact that results contain names and sizes but no file content, which is exactly what an agent needs given there is no output schema. It stops short of disclosing ordering, pagination, or size limits for large workspaces.

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 tight sentences with zero waste: the capability and its output boundary come first, the usage guidance second. Every clause carries information.

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?

For a simple one-parameter read tool with no output schema, the description covers purpose, return contents, and usage routing. The remaining gap is the undocumented workspaceId, which matters for correct invocation.

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% for the single required workspaceId integer, and the description only implies the scoping ('the workspace's code files') without explaining the parameter, its expected source, or how to obtain a valid ID. It partially compensates by making workspace scoping obvious, but leaves the parameter itself undocumented.

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?

States a specific verb and resource ('Lists the workspace's code files') and immediately bounds the output ('with their sizes — names only, no content'). The contrast with 'pulling the whole workspace' lets an agent separate it from content-retrieval siblings such as get_workspace_content without opening a schema.

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?

Gives a clear when-to-use rule ('before reading or writing one') and an explicit when-not ('instead of pulling the whole workspace to find out'). It does not name the specific alternative tool, so the agent must map the described behavior to a sibling, but the intent is unambiguous.

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