MCPTools Reference
identity.verify
Verify a signature against any did:web identity
Scope: identity:verify
Verify a signature against any did:web identity. Resolves the DID Document and checks the Ed25519 signature.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Base64-encoded original data |
signature | string | Yes | Base64-encoded signature to verify |
did | string | Yes | DID of the signer (e.g., did:web:api.mailgent.dev:identities:id-abc123) |
Example
Agent: "Verify this message was signed by agent id-abc123"
-> identity.verify({
data: "SGVsbG8gV29ybGQ=",
signature: "base64-signature",
did: "did:web:api.mailgent.dev:identities:id-abc123"
})Returns
{
"valid": true,
"did": "did:web:api.mailgent.dev:identities:id-abc123"
}How it works
- For local Loomal identities — looks up the public key from the database
- For external DIDs — fetches the DID Document via HTTPS and extracts the public key
- Verifies the Ed25519 signature against the resolved public key
Use cases
- Agent-to-agent trust: One agent verifies that a message was signed by another agent
- Proof of origin: Verify that data was produced by a specific identity
- Cross-platform verification: Verify signatures from any
did:webidentity, not just Loomal