Skip to main content
Glama

manus_file_delete

Delete a file manually from Manus. Files auto-delete after 48 hours, but you can remove them sooner to free up space or remove sensitive data.

Instructions

Delete a file. Files auto-delete 48 hours after upload, so manual deletion is optional.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idYes

Implementation Reference

  • The actual handler function for the manus_file_delete tool. Decorated with @manus_tool, it makes a POST request to /v2/file.delete with the provided FileDeleteRequest and returns a FileDeleteResponse.
    @manus_tool(
        name="manus_file_delete",
        description=(
            "Delete a file. Files auto-delete 48 hours after upload, so manual deletion is optional."
        ),
        input_schema=FileDeleteRequest,
        output_schema=FileDeleteResponse,
    )
    async def file_delete(req: FileDeleteRequest, ctx: ToolCtx) -> FileDeleteResponse:
        return await ctx.client.call(
            "POST",
            "/v2/file.delete",
            json_body=req,
            response_model=FileDeleteResponse,
            rate_limit_key="file.delete",
        )
  • Input schema for the manus_file_delete tool, requiring a file_id string.
    class FileDeleteRequest(ManusModel):
        file_id: str
  • Output schema for the manus_file_delete tool, extending ResponseEnvelope (contains ok and request_id fields).
    class FileDeleteResponse(ResponseEnvelope):
        pass
  • The @manus_tool decorator registers the tool with name='manus_file_delete' in the global _REGISTRY dict (defined in registry.py).
    @manus_tool(
        name="manus_file_delete",
        description=(
            "Delete a file. Files auto-delete 48 hours after upload, so manual deletion is optional."
        ),
        input_schema=FileDeleteRequest,
        output_schema=FileDeleteResponse,
    )
    async def file_delete(req: FileDeleteRequest, ctx: ToolCtx) -> FileDeleteResponse:
        return await ctx.client.call(
            "POST",
            "/v2/file.delete",
            json_body=req,
            response_model=FileDeleteResponse,
            rate_limit_key="file.delete",
        )
  • The registry infrastructure that stores all tools. The @manus_tool decorator calls _REGISTRY[name] = ToolDef(...) to register each tool, accessible via all_tools().
    _REGISTRY: dict[str, ToolDef[Any, Any]] = {}
    
    
    def manus_tool(
        *,
        name: str,
        description: str,
        input_schema: type[TIn],
        output_schema: type[TOut],
        rate_limit_key: str | None = None,
    ) -> Callable[
        [Callable[[TIn, ToolCtx], Awaitable[TOut]]], Callable[[TIn, ToolCtx], Awaitable[TOut]]
    ]:
        """Decorator registering `handler` as a tool with the given metadata."""
    
        def wrap(
            handler: Callable[[TIn, ToolCtx], Awaitable[TOut]],
        ) -> Callable[[TIn, ToolCtx], Awaitable[TOut]]:
            if name in _REGISTRY:
                raise RuntimeError(f"Duplicate tool name: {name}")
            _REGISTRY[name] = ToolDef(
                name=name,
                description=description,
                input_schema=input_schema,
                output_schema=output_schema,
                handler=handler,
                rate_limit_key=rate_limit_key,
            )
            return handler
    
        return wrap
    
    
    def all_tools() -> list[ToolDef[Any, Any]]:
        """Return a stable-ordered copy of every registered tool."""
        return sorted(_REGISTRY.values(), key=lambda t: t.name)
    
    
    def clear_registry() -> None:
        """Test helper."""
        _REGISTRY.clear()
Behavior3/5

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

No annotations exist, so the description carries the behavioral burden. It mentions auto-deletion policy, which is useful, but does not disclose permissions, irreversibility, or consequences of deletion.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two sentences. The first sentence states the action, and the second provides temporal context. No extraneous information.

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 simple deletion tool with one parameter, the description covers the basic purpose and an important behavioral note. However, it lacks details about return values or error handling.

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?

The schema has 0% description coverage and only one parameter, file_id. The description adds no additional meaning about this parameter beyond what the schema provides.

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 'Delete a file' as the action and resource. It includes additional context about auto-deletion policy, adding value beyond the name. However, it does not differentiate from sibling tools like manus_file_create or manus_file_upload.

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

Usage Guidelines3/5

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

The description implies that manual deletion is optional due to auto-deletion after 48 hours, giving basic guidance on when to use it. But it lacks explicit statements about when not to use it or alternatives.

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/aruxojuyu665/Manus-MCP'

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