Skip to main content
Glama
supavec

Supavec MCP Server

by supavec

list-user-files

Retrieve and manage all files uploaded by the current user on Supavec MCP Server with configurable pagination and sorting options for organized access.

Instructions

List all files uploaded to Supavec for the current user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of files to fetch (default: 10)
offsetNoOffset for pagination (default: 0)
order_dirNoOrder direction for resultsdesc

Implementation Reference

  • The handler function for the 'list-user-files' tool. It extracts pagination parameters from the request, makes an API call to Supavec's /user_files endpoint, handles errors, and returns the list of user files as JSON.
    if (request.params.name === "list-user-files") {
      const limit = request.params.arguments?.limit || 10;
      const offset = request.params.arguments?.offset || 0;
      const order_dir = request.params.arguments?.order_dir || "desc";
    
      const userFilesUrl = `${SUPAVEC_BASE_URL}/user_files`;
      const requestBody: UserFilesRequest = {
        pagination: {
          limit,
          offset,
        },
        order_dir,
      };
    
      const userFiles = await makeSupavecRequest<UserFilesResponse>(
        userFilesUrl,
        requestBody,
        apiKey
      );
    
      if ("error" in userFiles) {
        return {
          content: [
            {
              type: "text",
              text: `Failed to retrieve user files: ${userFiles.error}`,
            },
          ],
        };
      }
    
      return {
        content: [
          {
            type: "text",
            mimeType: "application/json",
            text: JSON.stringify(userFiles, null, 2),
          },
        ],
      };
    }
  • The tool definition including name, description, and input schema for 'list-user-files', used for tool registration and validation.
    {
      name: "list-user-files",
      description: "List all files uploaded to Supavec for the current user",
      inputSchema: {
        type: "object",
        properties: {
          limit: {
            type: "number",
            description: "Number of files to fetch (default: 10)",
            default: 10,
          },
          offset: {
            type: "number",
            description: "Offset for pagination (default: 0)",
            default: 0,
          },
          order_dir: {
            type: "string",
            description: "Order direction for results",
            enum: ["desc", "asc"],
            default: "desc",
          },
        },
        required: [],
      },
    },
  • Registration of the list of tools (including list-user-files) via setupListToolsHandler, which responds to ListToolsRequestSchema with the tools array.
    export function setupListToolsHandler(server: any) {
      server.setRequestHandler(ListToolsRequestSchema, async () => {
        return {
          tools,
        };
      });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a list operation but doesn't mention whether it requires authentication, has rate limits, returns paginated results, or what format the output takes. The description is minimal and lacks important behavioral context for a tool that presumably accesses user data.

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 a single, efficient sentence that states exactly what the tool does without any wasted words. It's appropriately sized for a simple list operation and gets straight to the point.

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?

For a list operation with 3 well-documented parameters and no output schema, the description provides the basic purpose but lacks important context. Without annotations, it should ideally mention authentication requirements, return format, or pagination behavior. The description is adequate but has clear gaps given the tool's data access nature.

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 description coverage is 100%, with all three parameters well-documented in the schema itself. The description doesn't add any parameter information beyond what's already in the schema, so it meets the baseline for high schema coverage without adding extra value.

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 action ('List all files') and resource ('uploaded to Supavec for the current user'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from the sibling tool 'fetch-embeddings', which appears to be a different operation rather than a direct alternative for listing 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 the sibling tool 'fetch-embeddings' or any other context for selection. The only implied usage is for listing user files, but there's no explicit when/when-not guidance.

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

Related 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/supavec/mcp-server'

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