Skip to main content
Glama

list_files

Read-only

Retrieve and organize uploaded files from xAI with customizable sorting, filtering, and display options.

Instructions

List files previously uploaded to xAI.

Args:
    limit: Maximum number of files to return (default 100).
    order: `"asc"` or `"desc"` sort order (default `"desc"`).
    sort_by: Field to sort by, such as `"created_at"`.

Returns:
    Markdown list of files with ID, filename, and size, or a placeholder when empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
orderNodesc
sort_byNocreated_at
Behavior4/5

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

The annotations provide readOnlyHint=true, indicating this is a safe read operation. The description adds valuable behavioral context beyond annotations: it specifies that it lists 'previously uploaded' files (implying it doesn't upload new ones), describes the return format ('Markdown list of files with ID, filename, and size'), and mentions a placeholder for empty results. This compensates well for the lack of output schema.

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 well-structured and front-loaded with the core purpose, followed by clear sections for arguments and returns. Every sentence adds value: the first states the tool's function, and subsequent lines explain parameters and output without redundancy. It's appropriately sized for a tool with three parameters.

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?

Given the tool's moderate complexity (3 parameters, no output schema, read-only operation), the description is largely complete. It covers the purpose, parameters, and return format. However, it lacks explicit usage guidelines compared to siblings and doesn't mention potential limitations like pagination or authentication needs, leaving minor gaps.

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

Parameters5/5

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

The input schema has 0% description coverage, providing only titles and types without explanations. The description fully compensates by detailing all three parameters: 'limit' (maximum number to return with default), 'order' (sort order options and default), and 'sort_by' (field to sort by with example). It adds essential semantic meaning not present in the schema.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'List files previously uploaded to xAI.' It specifies the verb ('List') and resource ('files previously uploaded to xAI'), which is clear and specific. However, it doesn't explicitly distinguish this tool from sibling tools like 'get_file' or 'get_file_content', which focus on retrieving specific files rather than listing all uploaded files.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_file' for retrieving specific files or 'upload_file' for adding files, nor does it specify prerequisites such as needing uploaded files to exist. Usage context is implied but not explicitly stated.

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/merterbak/Grok-MCP'

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