Skip to main content
Glama

Session Files

session_files
Read-onlyIdempotent

List files in a session's workspace, with optional subdirectory path and pagination for large directories.

Instructions

List workspace files, optionally using a bounded cursor page. Use session_artifacts, not this, for only the files executed code produced; use session_read_file for one file's contents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoSubdirectory to list, relative to the workspace root; empty lists the root
cursorNoOpaque page cursor from a previous session_files call's response, to fetch the next page
page_sizeNoMax entries per page; omit for one unpaginated listing
session_idYesId of the session whose workspace files to list

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.12.0
    • addedInput schema / properties / cursor / description
      Added value: +"Opaque page cursor from a previous session_files call's response, to fetch the next page"
    • addedInput schema / properties / page_size / description
      Added value: +"Max entries per page; omit for one unpaginated listing"
    • addedInput schema / properties / path / description
      Added value: +"Subdirectory to list, relative to the workspace root; empty lists the root"
    • addedInput schema / properties / session_id / description
      Added value: +"Id of the session whose workspace files to list"
  2. Changed1 schema field changedv0.11.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "title": "session_filesDictOutput",
      +  "type": "object"
      +}
  3. Changed7 schema fields changedv0.2.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / cursor
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Cursor"
      +}
    • addedInput schema / properties / page_size
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Page Size"
      +}
    • addedInput schema / properties / path / title
      Added value: +"Path"
    • addedInput schema / properties / session_id / title
      Added value: +"Session Id"
    • addedInput schema / title
      Added value: +"session_filesArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  4. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds useful behavioral context: it mentions the optional bounded cursor page and clarifies that omitting page_size yields one unpaginated listing. It doesn't describe pagination details or return format, but the output schema exists and the annotations carry the safety burden, so a 4 is appropriate.

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?

The description is two sentences with zero waste. The core action is front-loaded, and the sibling routing is compact and clear. Every sentence earns its place.

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 read-only listing tool with full schema coverage and an output schema, the description is nearly complete. It covers the main use case, pagination behavior, and sibling distinctions. The only minor gap is that it doesn't describe the shape of the returned listing, but the output schema likely covers that, so this is not a significant omission.

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 100%, so the schema already documents all four parameters. The description adds a little context by mentioning the cursor page and unpaginated listing, but it doesn't add meaning beyond what the schema provides. Baseline 3 is correct.

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 states a specific verb ('List') and resource ('workspace files'), and immediately distinguishes itself from sibling tools: 'Use session_artifacts, not this, for only the files executed code produced; use session_read_file for one file's contents.' This makes the tool's purpose and boundaries clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells the agent when NOT to use this tool and names the alternatives: session_artifacts for code-produced files and session_read_file for single-file contents. This is direct routing guidance that leaves no ambiguity about selection.

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