Skip to main content
Glama
vdappdev2

vtimestamp-mcp

vtimestamp_verify

Verify file or text timestamps on the Verus blockchain using SHA-256 hashes. Check if content has been recorded on-chain and retrieve proof details for verification.

Instructions

Verify whether a file or text has been timestamped on a VerusID. Provide either a file_path or text — the server computes the SHA-256 hash and checks it against the on-chain record. Returns blockchain proof details if found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
identityYesVerusID name (e.g., "alice@")
file_pathNoPath to a file to verify. Mutually exclusive with text.
textNoText string to verify. Mutually exclusive with file_path.

Implementation Reference

  • Registration and handler implementation for the vtimestamp_verify tool.
    server.tool(
      'vtimestamp_verify',
      'Verify whether a file or text has been timestamped on a VerusID. Provide either a file_path or text — the server computes the SHA-256 hash and checks it against the on-chain record. Returns blockchain proof details if found.',
      {
        identity: z.string().describe('VerusID name (e.g., "alice@")'),
        file_path: z.string().optional().describe('Path to a file to verify. Mutually exclusive with text.'),
        text: z.string().optional().describe('Text string to verify. Mutually exclusive with file_path.'),
      },
      async ({ identity, file_path, text }) => {
        if (!isValidIdentity(identity)) {
          throw new McpError(
            ErrorCode.InvalidParams,
            'Invalid identity format — must be a VerusID name ending with @ (e.g., "alice@")'
          );
        }
    
        // Validate exactly one input mode
        if (!file_path && !text) {
          throw new McpError(
            ErrorCode.InvalidParams,
            'Must provide either file_path or text'
          );
        }
        if (file_path && text) {
          throw new McpError(
            ErrorCode.InvalidParams,
            'Only one of file_path or text may be provided — they are mutually exclusive'
          );
        }
    
        // Resolve hash from the provided input
        let hash: string;
        if (file_path) {
          try {
            const fileBuffer = await readFile(file_path);
            hash = sha256(fileBuffer);
          } catch (err) {
            throw new McpError(
              ErrorCode.InvalidParams,
              `Failed to read file: ${err instanceof Error ? err.message : 'Unknown error'}`
            );
          }
        } else {
          hash = sha256(text!);
        }
    
        try {
          const keys = getVdxfKeys();
          const historyResponse = await getIdentityHistory(identity);
          const timestamp = findTimestampByHash(historyResponse.history, hash, keys);
    
          if (!timestamp) {
            return {
              content: [
                {
                  type: 'text' as const,
                  text: JSON.stringify(
                    {
                      verified: false,
                      identity: historyResponse.fullyqualifiedname,
                      hash,
                      message: `No timestamp matching this hash was found on identity ${historyResponse.fullyqualifiedname}`,
                    },
                    null,
                    2
                  ),
                },
              ],
            };
          }
    
          let blocktime: number | undefined;
          try {
            const block = await getBlock(timestamp.blockhash);
            blocktime = block.time;
          } catch {
            // Block time is optional
          }
    
          return {
            content: [
              {
                type: 'text' as const,
                text: JSON.stringify(
                  {
                    verified: true,
                    identity: historyResponse.fullyqualifiedname,
                    hash: timestamp.data.sha256,
                    title: timestamp.data.title,
                    description: timestamp.data.description ?? null,
                    filename: timestamp.data.filename ?? null,
                    filesize: timestamp.data.filesize ?? null,
                    block_height: timestamp.blockheight,
                    block_time: blocktime
                      ? new Date(blocktime * 1000).toISOString()
                      : null,
                    block_hash: timestamp.blockhash,
                    transaction_id: timestamp.txid,
                  },
                  null,
                  2
                ),
              },
            ],
          };
        } catch (err) {
          if (err instanceof VerusRpcError && err.code === RPC_ERROR_CODES.IDENTITY_NOT_FOUND) {
            return {
              content: [
                {
                  type: 'text' as const,
                  text: JSON.stringify({
                    error: `Identity '${identity}' not found`,
                  }),
                },
              ],
              isError: true,
            };
          }
    
          if (err instanceof McpError) throw err;
    
          return {
            content: [
              {
                type: 'text' as const,
                text: JSON.stringify({
                  error: `Failed to verify timestamp: ${err instanceof Error ? err.message : 'Unknown error'}`,
                }),
              },
            ],
            isError: true,
          };
        }
      }
    );
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses key behavioral traits: the server computes SHA-256 hash, checks against on-chain records, and returns blockchain proof details. However, it doesn't mention error conditions, rate limits, authentication requirements, or what happens when no timestamp is found.

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 perfectly front-loaded with the core purpose in the first sentence, followed by implementation details. Every sentence earns its place by adding necessary information about parameters and return values. No wasted words or redundancy.

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

Completeness4/5

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

For a verification tool with no annotations and no output schema, the description does well by explaining the verification process and return values. However, it could be more complete by mentioning error cases, what 'blockchain proof details' includes, or whether this is a read-only operation.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds marginal value by explaining the mutual exclusivity of file_path and text parameters and mentioning the SHA-256 hash computation, but doesn't provide additional semantic context beyond what's in the schema.

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

Purpose5/5

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

The description clearly states the specific action ('verify'), the resource ('a file or text'), and the verification target ('has been timestamped on a VerusID'). It distinguishes from sibling tools (vtimestamp_info, vtimestamp_list) by focusing on verification rather than information listing.

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

Usage Guidelines4/5

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

The description provides clear context about when to use this tool (to verify timestamping) and specifies the mutually exclusive parameter options (file_path or text). However, it doesn't explicitly mention when NOT to use it or name specific alternatives among the sibling tools.

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/vdappdev2/vtimestamp-mcp'

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