File Storage

A Model Context Protocol (MCP) server resource permitting MCP clients to store and manage persistent files in an account-specific file storage.

MCP Server Interface

This MCP Server is accessible on this endpoint: https://lab.tagroot.io/MCP/Files

Scopes supported:

The following subsections list MCP Server interfaces that are available on this resource. The MCP protocol is built on top of the JSON-RPC protocol. You find JSON-RPC interface below.

MCP Server Tools

Following subsections list MCP Server Tools that can be used to interact with the MCP Server.

Append Binary File

Appends a binary file in account-specific file storage. If the file does not exist, one is created.

Properties
Can Modify: Yes
Can Destroy: No
Is Idempotent: No
Open World Access: No

AppendBinaryFile(LocalFileName, Content)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.Files.Tools.Append
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
LocalFileName String Required - Local file name. Must not contain double period characters or begin with a path character, to attempt to escape file storage area. File extension must match Internet Content-Type of file contents.
Content String Required - BASE-64 encoded binary content of file to append. The contents must not be harmful, be executable, or contain illegal information.
Return Value
Type Description
String URI of appended file resource.

Append Text File

Appends a text file in account-specific file storage. If the file does not exist, one is created. Text contents is stored UTF-8 encoded (with a Byte-Order-Mark (BOM) if the file is created).

Properties
Can Modify: Yes
Can Destroy: No
Is Idempotent: No
Open World Access: No

AppendTextFile(LocalFileName, Content, AppendCrLf)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.Files.Tools.Append
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
LocalFileName String Required - Local file name. Must not contain double period characters or begin with a path character, to attempt to escape file storage area. File extension must match Internet Content-Type of file contents.
Content String Required - Text content of file to append. The contents must not be harmful or contain illegal information.
AppendCrLf Boolean Required - If true, a carriage-return/line-feed (CRLF) is appended to the text content before appending it to the file.
Return Value
Type Description
String URI of appended file resource.

Create Binary File

Creates a binary file in account-specific file storage. If a file with the same name exists, it is replaced.

Properties
Can Modify: Yes
Can Destroy: No
Is Idempotent: Yes
Open World Access: No

CreateBinaryFile(LocalFileName, Content)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.Files.Tools.Create
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
LocalFileName String Required - Local file name. Must not contain double period characters or begin with a path character, to attempt to escape file storage area. File extension must match Internet Content-Type of file contents.
Content String Required - BASE-64 encoded binary content of file to create. The contents must not be harmful, be executable, or contain illegal information.
Return Value
Type Description
String URI of created file resource.

Create Text File

Creates a text file in account-specific file storage. If a file with the same name exists, it is replaced. Text contents is stored UTF-8 encoded, with a Byte-Order-Mark (BOM).

Properties
Can Modify: Yes
Can Destroy: No
Is Idempotent: Yes
Open World Access: No

CreateTextFile(LocalFileName, Content, AppendCrLf)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.Files.Tools.Create
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
LocalFileName String Required - Local file name. Must not contain double period characters or begin with a path character, to attempt to escape file storage area. File extension must match Internet Content-Type of file contents.
Content String Required - Text content of file to create. The contents must not be harmful or contain illegal information.
AppendCrLf Boolean Required - If true, a carriage-return/line-feed (CRLF) is appended to the text content before creating the file.
Return Value
Type Description
String URI of created file resource.

Delete File

Deletes a file in account-specific file storage, regardless of type. The file must exist.

Properties
Can Modify: Yes
Can Destroy: Yes
Is Idempotent: No
Open World Access: No

DeleteFile(LocalFileName)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.Files.Tools.Delete
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
LocalFileName String Required - Local file name. Must not contain double period characters or begin with a path character, to attempt to escape file storage area. File extension must match Internet Content-Type of file contents.
Return Value
Type Description
String URI of deleted file resource.

Edit

Edits a file in account-specific file storage.

Properties
Can Modify: Yes
Can Destroy: Yes
Is Idempotent: No
Open World Access: No

EditFile(LocalFileName, Sensitive)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.Files.Tools.Edit
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
LocalFileName String Required - Local file name. Must not contain double period characters or begin with a path character, to attempt to escape file storage area. File extension must match Internet Content-Type of file contents.
Sensitive Boolean Required - If the contents of the file are sensitive, set this to true. Sensitive information will be edited in a separate protected window and not inline.
Return Value
Type Description
String URI of updated file resource.

Searches for files in account-specific file storage that have file names matching a given search pattern.

Properties
Can Modify: No
Can Destroy: No
Is Idempotent: Yes
Open World Access: No

SearchFiles(Pattern)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.Files.Tools.Search
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
Pattern String Optional "*.*" File name search pattern. Must not contain double period characters or path characters, to attempt to escape file storage area. Use asterisk (*) as wildcard, or questionmark (?) as a character wildcard.
Return Value
Type Description
SearchResult Search result of files in account-specific file storage.

Update Binary File

Updates a binary file in account-specific file storage. The file must exist.

Properties
Can Modify: Yes
Can Destroy: Yes
Is Idempotent: Yes
Open World Access: No

UpdateBinaryFile(LocalFileName, Content)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.Files.Tools.Update
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
LocalFileName String Required - Local file name. Must not contain double period characters or begin with a path character, to attempt to escape file storage area. File extension must match Internet Content-Type of file contents.
Content String Required - BASE-64 encoded binary content of file to update. The contents must not be harmful, be executable, or contain illegal information.
Return Value
Type Description
String URI of updated file resource.

Update Text File

Updates a text file in account-specific file storage, replacing its previous content with new content. The file must exist. Text contents is stored UTF-8 encoded, with a Byte-Order-Mark (BOM).

Properties
Can Modify: Yes
Can Destroy: Yes
Is Idempotent: Yes
Open World Access: No

UpdateTextFile(LocalFileName, Content, AppendCrLf)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.Files.Tools.Update
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
LocalFileName String Required - Local file name. Must not contain double period characters or begin with a path character, to attempt to escape file storage area. File extension must match Internet Content-Type of file contents.
Content String Required - Text content of file to update. The contents must not be harmful or contain illegal information.
AppendCrLf Boolean Required - If true, a carriage-return/line-feed (CRLF) is appended to the text content before updating the file.
Return Value
Type Description
String URI of updated file resource.

MCP Server Resources

This MCP Server supports MCP Server Resources.

Each resource represents a file in the account-specific file storage. As files are created, modified, renamed or deleted, resource events are propagated to clients that receive notifications (new, renamed or deleted files) or have resource subscriptions active (modifed files).

Note: Files are account-specific. This means that other clients have different sets of files. This means that URIs cannot be meaningfully shared, as they point to different files in each account-specific storage. The purpose of the account-specific storage is to store information for later processing or reference.

JSON-RPC Interface

This JSON-RPC Web Service is accessible on this endpoint: https://lab.tagroot.io/MCP/Files

The following subsections list JSON-RPC methods that are available on this resource.

initialize(ProtocolVersion, Capabilities, ClientInfo)

MCP initialize method. Called by client to initialize connection and exchange information about capabilities.

Authentication
Required: No
Arguments
Name Type Use Default Value Description
ProtocolVersion String Required - Protocol Version
Capabilities Dictionary Required - Client capabilities
ClientInfo Dictionary Required - Client information
Return Value
Type Description
Dictionary Server capabilities and information.

notifications/initialized()

Notification that the client has completed its initialization.

Authentication
Required: No

prompts/get(Name, Arguments, _Meta)

Gets an MCP server prompt.

Authentication
Required: No
Arguments
Name Type Use Default Value Description
Name String Required - Name of the prompt to call.
Arguments Dictionary Required - Arguments for the prompt.
_Meta Object Optional null Associated meta-data, if available.
Return Value
Type Description
Dictionary Dictionary containing the prompt.

prompts/list(Cursor)

Lists available MCP server prompts.

Authentication
Required: No
Arguments
Name Type Use Default Value Description
Cursor String Optional null Cursor for pagination.
Return Value
Type Description
Dictionary Dictionary containing the list of prompts.

resources/list(Cursor)

Lists available MCP server resources.

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.Files.Resources.List
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
Cursor String Optional null
Return Value
Type Description
Dictionary

resources/read(Uri, _Meta)

Reads an MCP server resource.

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.Files.Resources.Read
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
Uri URI Required -
_Meta Object Optional null
Return Value
Type Description
Dictionary

resources/subscribe(Uri)

Subscribes to an MCP server resource.

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.Files.Resources.List
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
Uri URI Required -

resources/unsubscribe(Uri)

Unsubscribes from an MCP server resource.

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.Files.Resources.List
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
Uri URI Required -

tools/call(Name, Arguments, Task, _Meta)

Calls an MCP server tool.

Authentication
Required: No
Arguments
Name Type Use Default Value Description
Name String Required - Name of the tool to call.
Arguments Dictionary Required - Arguments for the tool.
Task Object Optional null

If specified, the caller is requesting task-augmented execution for this request. The request will return a CreateTaskResult immediately, and the actual result can be retrieved later via tasks/result.

Task augmentation is subject to capability negotiation - receivers MUST declare support for task augmentation of specific request types in their capabilities.

_Meta Object Optional null Associated meta-data, if available.
Return Value
Type Description
Dictionary Dictionary containing the result of the tool call.

tools/list(Cursor)

Lists available MCP server tools.

Authentication
Required: No
Arguments
Name Type Use Default Value Description
Cursor String Optional null Cursor for pagination.
Return Value
Type Description
Dictionary Dictionary containing the list of tools.

Types

This Web Service encodes named types as JSON dictionary objects. The following subsections list the named typed and their corresponding properties.

SearchResult

Properties
Name Type Description
NrMatches 32-bit signed integer Number of matches found. [0,∞)
NrFilesTotal 32-bit signed integer Total number of files in account-specific file storage. [0,∞)
Pattern String Search pattern used.
FileNames Array of String File names matching the search pattern.
ResourceUris Array of String Resource URIs matching the search pattern.