Skip to main content
Glama

agentbay_project_files

Get a complete list of files within a project, including their file paths and sizes. Provide the project ID to retrieve structured file details for inventory or management purposes.

Instructions

List all files in a project with paths and sizes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID

Implementation Reference

  • The handler for the 'agentbay_project_files' tool. It calls the API endpoint /api/v1/projects/{projectId}/files, lists all files with paths and sizes, and formats the response.
    server.tool(
      'agentbay_project_files',
      'List all files in a project with paths and sizes',
      { projectId: z.string().describe('Project ID') },
      async ({ projectId }) => {
        const data = await apiGet(`/api/v1/projects/${projectId}/files`);
        if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] };
        const files = data.files || [];
        if (!files.length) return { content: [{ type: 'text' as const, text: 'No files in this project yet.' }] };
        const text = files.map((f: any) => `${f.path} (${(f.sizeBytes / 1024).toFixed(1)}KB, v${f.version})`).join('\n');
        return { content: [{ type: 'text' as const, text: `${files.length} files:\n\n${text}` }] };
      }
    );
  • The schema for 'agentbay_project_files' defines a single required parameter 'projectId' of type string.
    server.tool(
      'agentbay_project_files',
      'List all files in a project with paths and sizes',
      { projectId: z.string().describe('Project ID') },
  • src/index.ts:1024-1037 (registration)
    The tool is registered via server.tool() call with the name 'agentbay_project_files' at line 1025.
    // Tool 37: Project Files (list)
    server.tool(
      'agentbay_project_files',
      'List all files in a project with paths and sizes',
      { projectId: z.string().describe('Project ID') },
      async ({ projectId }) => {
        const data = await apiGet(`/api/v1/projects/${projectId}/files`);
        if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] };
        const files = data.files || [];
        if (!files.length) return { content: [{ type: 'text' as const, text: 'No files in this project yet.' }] };
        const text = files.map((f: any) => `${f.path} (${(f.sizeBytes / 1024).toFixed(1)}KB, v${f.version})`).join('\n');
        return { content: [{ type: 'text' as const, text: `${files.length} files:\n\n${text}` }] };
      }
    );
Behavior2/5

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

No annotations exist. Description only states the action but does not disclose any behavioral traits (e.g., read-only implied but not explicit, no info on performance, auth requirements, or 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?

Single sentence, no redundant information, perfectly concise for the tool's simplicity.

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?

Given low complexity (1 param, no output schema), description is adequate but lacks details about response format (e.g., structure of file info). Could be improved with example output.

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% for the single parameter 'projectId'. The description adds no additional meaning beyond what the schema provides, matching baseline expectation.

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?

Description explicitly states 'List all files in a project with paths and sizes', a specific action on a distinct resource. This clearly differentiates it from sibling tools like project_get (project details) and project_read_file (single file content).

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?

No guidance on when to use this tool versus alternatives (e.g., project_read_file for content, project_list for projects). No exclusions or context provided.

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/thomasjumper/agentbay-mcp'

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