list_attachments
Retrieve a filtered list of attachments from the Norman Finance MCP Server by file name, type, description, brand name, or linkage to transactions.
Instructions
Get list of attachments with optional filters.
Args:
file_name: Filter by file name (case insensitive partial match)
linked: Filter by whether attachment is linked to transactions
attachment_type: Filter by attachment type (invoice, receipt, contract, other)
description: Filter by description (case insensitive partial match)
brand_name: Filter by brand name (case insensitive partial match)
Returns:
List of attachments matching the filters
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| attachment_type | No | ||
| brand_name | No | ||
| description | No | ||
| file_name | No | ||
| linked | No |
Implementation Reference
- norman_mcp/tools/documents.py:204-248 (handler)The handler function for the 'list_attachments' tool. It takes optional filter parameters, constructs an API request to fetch attachments for the current company, and returns the list.async def list_attachments( ctx: Context, file_name: Optional[str] = Field(description="Filter by file name (case insensitive partial match)"), linked: Optional[bool] = Field(description="Filter by whether attachment is linked to transactions"), attachment_type: Optional[str] = Field(description="Filter by attachment type (invoice, receipt, contract, other)"), description: Optional[str] = Field(description="Filter by description (case insensitive partial match)"), brand_name: Optional[str] = Field(description="Filter by brand name (case insensitive partial match)") ) -> Dict[str, Any]: """ Get list of attachments with optional filters. Args: file_name: Filter by file name (case insensitive partial match) linked: Filter by whether attachment is linked to transactions attachment_type: Filter by attachment type (invoice, receipt, contract, other) description: Filter by description (case insensitive partial match) brand_name: Filter by brand name (case insensitive partial match) Returns: List of attachments matching the filters. Use field "file" that contains direct links to the file in the response and make the link clickable along with the other fields. """ api = ctx.request_context.lifespan_context["api"] company_id = api.company_id if not company_id: return {"error": "No company available. Please authenticate first."} attachments_url = urljoin( config.api_base_url, f"api/v1/companies/{company_id}/attachments/" ) params = {} if file_name: params["file_name"] = file_name if linked is not None: params["linked"] = linked if attachment_type: params["has_type"] = attachment_type if description: params["description"] = description if brand_name: params["brand_name"] = brand_name return api._make_request("GET", attachments_url, params=params)
- norman_mcp/server.py:332-332 (registration)Call to register_document_tools which defines and registers the list_attachments tool (among others) with the MCP server.register_document_tools(server)