Skip to main content
Glama

anp.setAuth

Set up authentication for ANP agent communication by providing DID document and private key files, enabling secure document fetching and method invocation.

Instructions

设置 DID 认证上下文。使用本地 DID 文档和私钥文件建立认证,后续的 fetchDoc 和 invokeOpenRPC 调用将自动使用这些凭证。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
did_document_pathYesDID 文档 JSON 文件的路径
did_private_key_pathYesDID 私钥 PEM 文件的路径
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool's behavior: it establishes authentication context that persists for subsequent calls, specifies the credential sources (local DID document and private key files), and indicates this is a setup/configuration operation rather than a data operation. However, it doesn't mention potential side effects like error conditions or what happens if authentication fails.

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 extremely concise and well-structured in just two sentences. The first sentence states the core purpose, and the second sentence explains the usage context and benefit. Every word serves a clear purpose with zero wasted information, making it easy for an AI agent to parse and understand.

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 2-parameter authentication setup tool with no annotations and no output schema, the description provides excellent context about what the tool does and how it integrates with sibling tools. It clearly explains the tool's role in the authentication flow. The only minor gap is the lack of information about return values or error conditions, but given the tool's straightforward nature, this is acceptable.

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?

The schema has 100% description coverage, so the schema already fully documents both parameters. The description doesn't add any parameter-specific information beyond what's in the schema descriptions. This meets the baseline of 3 when schema coverage is high, but doesn't provide additional semantic context about how these parameters interact or their format requirements.

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 tool's purpose with specific verbs ('设置 DID 认证上下文', '建立认证') and identifies the resource (authentication context). It explicitly distinguishes from sibling tools by mentioning that subsequent calls to 'fetchDoc' and 'invokeOpenRPC' will automatically use these credentials, establishing clear differentiation.

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

Usage Guidelines5/5

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

The description provides explicit usage guidance: it specifies when to use this tool ('使用本地 DID 文档和私钥文件建立认证') and names the specific sibling tools ('fetchDoc' and 'invokeOpenRPC') that will benefit from this authentication setup. This creates clear context for when this tool should be invoked versus when to use the sibling tools directly.

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/agent-network-protocol/mcp2anp'

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