MeshKit

Tools

MeshKit MCP tool catalog.

@meshkit/mcp currently exposes four tools. Keep the exposed set smaller than the available set whenever the agent workflow allows it.

Each tool has a declared scope, JSON-schema-like inputSchema, and run(input) function. The host should use the schema to guide model calls and enforce policy before execution.

Catalog

ToolScopeRequired inputOutputMain risk
meshkit.files.putfiles:writecontentMeshFileAgent stores sensitive plaintext supplied in tool input.
meshkit.inspectproofs:readcidMeshProofAgent learns proof metadata for a CID.
meshkit.identity.createidentity:writeidMeshKit identity public key objectAgent creates identities that may later receive shares.
meshkit.share.withshare:writecid, recipientShareCapsuleAgent grants future access to encrypted content.

meshkit.files.put

Stores string content through mesh.files.put.

await tool.run({
  name: "agent-object",
  content: "text to encrypt",
  contentType: "text/plain",
});

Inputs:

FieldRequiredDefaultRuntime limit
contentYesNone1048576 UTF-8 bytes
nameNoagent-object256 UTF-8 bytes
contentTypeNotext/plain128 UTF-8 bytes

Use this for small text payloads only. For larger files, write through an application-controlled SDK workflow and give the agent the resulting CID.

meshkit.inspect

Returns proof metadata for a CID.

await tool.run({
  cid: "bafy...",
});

Inputs:

FieldRequiredRuntime limit
cidYes256 UTF-8 bytes

Inspection does not decrypt content. It answers whether MeshKit proof metadata is available for the CID in the configured environment.

meshkit.identity.create

Creates a local MeshKit recipient identity.

await tool.run({
  id: "alice",
});

Inputs:

FieldRequiredRuntime limit
idYes128 UTF-8 bytes

Treat identity creation as a controlled operation. The MCP package does not verify that alice maps to a real user, account, wallet, DID, email address, or passkey.

meshkit.share.with

Creates a share capsule for a CID and recipient through mesh.share.file(cid).with(recipient, options).

await tool.run({
  cid: "bafy...",
  recipient: "alice",
  expiresIn: "2h",
});

Inputs:

FieldRequiredRuntime limit
cidYes256 UTF-8 bytes
recipientYes128 UTF-8 bytes
expiresInNo16 UTF-8 bytes

The schema advertises expiresIn as a string matching ^[0-9]+[mhd]$. If your MCP transport does not enforce schemas before calling run, enforce that pattern in your host approval layer.

Sharing controls future MeshKit opens. It cannot erase plaintext already decrypted or copied by a recipient.

Tool Selection Patterns

Agent workflowTools to expose
Store agent-generated notes and inspect proof metadatameshkit.files.put, meshkit.inspect
Inspect known CIDs onlymeshkit.inspect
Prepare shares with human approvalmeshkit.inspect, meshkit.share.with
Onboard recipients in an admin flowmeshkit.identity.create plus explicit admin approval

Do not expose meshkit.share.with just because the agent can store content. Sharing is a separate permission.

Error Behavior

Tool validation can throw:

  • invalid_tool_input when input is missing, not an object, or a required field is not a string.
  • input_too_large when a runtime byte limit is exceeded.

The underlying MeshKit client may also throw provider, proof, identity, sharing, or authorization errors.

On this page