Skip to main content
Glama

session_write_file

Writes file content to a session workspace, using relative paths to seed input data for executed code. Enables setup of files for code execution sessions.

Instructions

Write a file into a session workspace (relative path, no escapes). Use this to seed input data for executed code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contentYes
session_idYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed6 schema fields changedv0.2.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / content / title
      Added value: +"Content"
    • addedInput schema / properties / path / title
      Added value: +"Path"
    • addedInput schema / properties / session_id / title
      Added value: +"Session Id"
    • addedInput schema / title
      Added value: +"session_write_fileArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description must disclose behavioral details. It mentions 'relative path, no escapes' and implies a write operation, but it doesn't state whether the file is overwritten, if directories are created, or any error conditions. It adds some context (seeding input) but lacks depth on side effects.

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 concise sentences with no fluff. The purpose is front-loaded, and every word adds value. Efficient and clear.

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?

The tool is simple but with no annotations and no output schema, the description should cover important behavioral aspects. It explains the use case and path constraint, but omits details like overwrite behavior, error handling, and return values. For a basic write, it's adequate but incomplete.

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?

The schema has no descriptions (0% coverage), so the description must compensate. It clarifies that 'path' is relative and cannot escape the workspace, and 'content' is the data to write. However, it doesn't explain 'session_id' beyond its name, and no format or constraints for content are given. Some meaning added, but not comprehensive.

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 the tool writes a file into a session workspace, specifying the verb 'Write' and resource, with an additional constraint 'relative path, no escapes'. It also distinguishes from sibling tools like session_read_file by focusing on writing and seeding input data.

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?

It provides a clear use case: 'Use this to seed input data for executed code.' This implies when to use it, though it doesn't explicitly mention alternatives or when not to use it. The constraint on relative paths is also helpful. Slightly more explicit exclusions would make it a 5.

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

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/The-40-Thieves/codecalc'

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