Skip to main content
Glama
hofill
by hofill

update_files

Replace file responses in the RequestRepo MCP server to manage HTTP request data, headers, and status codes for web inspection and sharing.

Instructions

Replace all file responses.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYes
confirmYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler implementation in RequestrepoMCPService.update_files that validates input, converts FileResponseInput to Response objects, requires confirmation, calls the client's update_files method, and returns status.
    def update_files(self, *, files: dict[str, FileResponseInput], confirm: bool) -> dict[str, Any]:
        self._require_confirm(confirm, "update_files")
        payload: dict[str, Response] = {}
        for path, file_response in files.items():
            try:
                base64.b64decode(file_response.raw_base64, validate=True)
            except binascii.Error as exc:
                raise ValueError(f"files[{path!r}].raw_base64 must be valid base64: {exc}") from exc
    
            payload[path] = Response(
                raw=file_response.raw_base64,
                headers=[
                    Header(header=header.header, value=header.value)
                    for header in file_response.headers
                ],
                status_code=file_response.status_code,
            )
    
        updated = self._client().update_files(payload)
        return {"updated": updated, "count": len(payload)}
  • MCP tool registration using @mcp.tool() decorator that exposes update_files as a callable tool with description and delegates to the service method.
    @mcp.tool()
    def update_files(files: dict[str, FileResponseInput], confirm: bool) -> dict[str, Any]:
        """Replace all file responses."""
        return resolved_service.update_files(files=files, confirm=confirm)
  • Pydantic BaseModel for FileResponseInput defining the input schema with raw_base64 string, optional headers list, and status_code with validation constraints.
    class FileResponseInput(BaseModel):
        """File response payload for update_files."""
    
        raw_base64: str
        headers: list[HeaderInput] = Field(default_factory=list)
        status_code: int = Field(default=200, ge=100, le=599)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Replace all file responses' implies a destructive mutation affecting multiple items, but doesn't clarify what 'all' encompasses (e.g., system-wide, per-user, or per-session), whether changes are reversible, or what authentication/rate limits apply. The description adds minimal behavioral context beyond the obvious mutation implication.

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 maximally concise at three words with zero wasted language. It's front-loaded with the core action and resource. While under-specified, this isn't a conciseness issue—every word earns its place by stating the essential operation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive mutation tool with 2 required parameters, complex nested objects, no annotations, and 0% schema description coverage, the description is severely incomplete. While an output schema exists (which relieves the description from explaining return values), the description fails to address critical context like scope, safety, parameter usage, or differentiation from siblings—making it inadequate for reliable tool invocation.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate but provides no parameter information. It doesn't explain what 'files' should contain, the purpose of the 'confirm' boolean, or how the FileResponseInput structure works. With 2 required parameters and complex nested objects, this leaves critical usage details undocumented.

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

Purpose2/5

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

The description 'Replace all file responses' states a verb ('Replace') and resource ('file responses'), but lacks specificity about what 'file responses' are in this context. It doesn't distinguish from sibling tools like 'set_file' or 'get_file', leaving the exact scope unclear. While not a tautology, it's too vague for effective tool selection.

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

Usage Guidelines1/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 'set_file' or 'list_files'. The description offers no context about prerequisites, appropriate scenarios, or exclusions. This forces the agent to guess based on tool names alone, which is insufficient for reliable decision-making.

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