Skip to main content
Glama

get_did

Generate a Decentralized Identifier (DID) for an agent from its public key and entity type, with optional metadata to document protocol or description.

Instructions

Create a DID (Decentralized Identifier) record for an agent from its public key.

Required:
    entity_type: the kind of agent/entity, e.g. "AI Agent" or "Toolbox".
    pk:          the agent's raw Ed25519 public key as a hex string
                 (64 hex chars, as produced by keygen.generate_raw_keys()).
                 Validated: must decode to 32 bytes, else ValueError.
                 Stored in the DID document as publicKeyMultibase.
    pktype:      the public key algorithm label, e.g. "ed25519"; recorded
                 as the verification method's type.

Optional metadata (recorded as top-level fields on the returned record):
    description:  human-readable description, e.g. "AIassistant".
    protocol:     protocol the agent speaks, e.g. "MCP".
    transparency: transparency-log reference, e.g. "6GPDL".

Returns the DID record dict: containing its "id" (the DID).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pkYes
pktypeYes
protocolNo
descriptionNo
entity_typeYes
transparencyNo
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses validation (pk must decode to 32 bytes), return value (DID record dict with 'id'), and storage behavior (values stored in document). However, it does not mention whether the operation is idempotent or what happens on duplicate keys.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-organized with bold headings for required and optional sections, making it scannable. It is somewhat verbose but each sentence adds value. Slight reduction could improve conciseness.

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?

Given no output schema, the description adequately covers what is returned (DID record dict with 'id'). It also explains validation and metadata recording. Missing are error states (e.g., duplicate key) and permission requirements, but overall it is fairly complete for a creation tool.

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

Parameters5/5

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

Schema coverage is 0%, so the description fully compensates. It adds crucial meaning for each parameter: pk format and validation, pktype algorithm label, and metadata fields' purpose. This goes well beyond the schema's empty titles.

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

Purpose4/5

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

The description clearly states 'Create a DID record', which is a specific verb+resource, but the tool name 'get_did' is misleading as it implies retrieval rather than creation. This could confuse the agent, especially given sibling 'resolve_did' which actually retrieves. The description does not explicitly differentiate from siblings.

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 lists required and optional fields with clear sections, implying usage context. However, it does not explicitly state when to use this tool versus alternatives like 'resolve_did', nor does it specify prerequisites or conditions for use.

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/fcapub/idm-mcp'

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