Skip to main content
Glama
hofill
by hofill

list_files

Retrieve all stored file responses to access captured web request data for inspection and management.

Instructions

List all file responses.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual list_files implementation in RequestrepoMCPService class. Retrieves all file responses from the requestrepo client and returns a dictionary with count and serialized file data.
    def list_files(self) -> dict[str, Any]:
        files = self._client().files()
        return {
            "count": len(files),
            "files": {
                path: serialize_file_response(response, decode_base64=False, max_bytes=self.config.max_bytes)
                for path, response in files.items()
            },
        }
  • MCP tool registration for list_files using @mcp.tool() decorator. This function exposes the list_files functionality through the MCP protocol by delegating to resolved_service.list_files().
    @mcp.tool()
    def list_files() -> dict[str, Any]:
        """List all file responses."""
        return resolved_service.list_files()
  • The serialize_file_response helper function used by list_files to convert Response objects into dictionaries containing raw_base64, headers, status_code, and optionally raw_decoded data.
    def serialize_file_response(
        response: Response,
        *,
        decode_base64: bool,
        max_bytes: int,
    ) -> dict[str, Any]:
        payload: dict[str, Any] = {
            "raw_base64": response.raw,
            "headers": [serialize_header(header) for header in response.headers],
            "status_code": response.status_code,
        }
        if decode_base64:
            try:
                decoded = base64.b64decode(response.raw, validate=True)
            except binascii.Error as exc:
                payload["raw_decoded"] = None
                payload["decode_error"] = str(exc)
            else:
                payload["raw_decoded"] = bytes_envelope(decoded, max_bytes=max_bytes)
        return payload
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states 'List all file responses' but doesn't disclose behavioral traits such as pagination, sorting, filtering, rate limits, authentication needs, or what 'all' entails (e.g., scope, limits). This is a significant gap for a list operation with zero annotation coverage.

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 sentence with no wasted words—'List all file responses'—making it highly concise and front-loaded. Every word serves a purpose, earning its place efficiently.

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 the tool has 0 parameters, 100% schema coverage, and an output schema exists, the description is minimally adequate. However, it lacks context on behavior (e.g., what 'file responses' are, how results are returned) and doesn't differentiate from siblings, leaving gaps in completeness for a list tool.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description doesn't add param info, but that's acceptable here. Baseline is 4 for zero parameters, as there's nothing to compensate for.

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

Purpose3/5

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

The description 'List all file responses' states a clear action (list) and resource (file responses), but it's vague about what 'file responses' means and doesn't distinguish from siblings like 'get_file' or 'list_requests'. The purpose is understandable but lacks specificity about scope or format.

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 is provided on when to use this tool versus alternatives like 'get_file' (for individual files) or 'list_requests' (for requests). The description implies it's for listing all files, but it doesn't specify context, prerequisites, or exclusions, leaving the agent to infer usage.

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/hofill/RequestRepo-MCP'

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