@emilia-protocol/mcp-server 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +67 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1562,9 +1562,74 @@ const CORE_TOOL_NAMES = new Set([
1562
1562
  'ep_install_preflight', // vet software before install
1563
1563
  ]);
1564
1564
  const INCLUDE_REGISTRY_TOOLS = process.env.EP_INCLUDE_REGISTRY_TOOLS === 'true';
1565
- const ADVERTISED_TOOLS = INCLUDE_REGISTRY_TOOLS
1565
+
1566
+ // MCP tool annotations (title + behavior hints) — required by the Anthropic
1567
+ // directory review ("All tools must include a title and the applicable
1568
+ // readOnlyHint or destructiveHint") and useful to every client for
1569
+ // scheduling and gating. Hints describe the EP API call each tool makes.
1570
+ const READ_ONLY_TOOLS = new Set([
1571
+ 'ep_check_signoff', 'ep_dispute_status', 'ep_domain_score',
1572
+ 'ep_get_commit_status', 'ep_get_handshake', 'ep_install_preflight',
1573
+ 'ep_leaderboard', 'ep_lineage', 'ep_list_policies', 'ep_principal_lookup',
1574
+ 'ep_search_entities', 'ep_trust_evaluate', 'ep_trust_profile',
1575
+ 'ep_verify_commit', 'ep_verify_delegation', 'ep_verify_handshake',
1576
+ 'ep_verify_receipt', 'ep_verify_zk_proof',
1577
+ ]);
1578
+ const DESTRUCTIVE_TOOLS = new Set(['ep_revoke_commit', 'ep_revoke_handshake']);
1579
+ const TOOL_TITLES = {
1580
+ ep_add_presentation: 'Add Entity Presentation',
1581
+ ep_appeal_dispute: 'Appeal Dispute',
1582
+ ep_batch_submit: 'Batch Submit Receipts',
1583
+ ep_bind_receipt_to_commit: 'Bind Receipt to Commit',
1584
+ ep_check_signoff: 'Check Signoff Status',
1585
+ ep_configure_auto_receipt: 'Configure Auto-Receipts',
1586
+ ep_create_delegation: 'Create Delegation',
1587
+ ep_delegation_judgment: 'Record Delegation Judgment',
1588
+ ep_dispute_file: 'File Dispute',
1589
+ ep_dispute_status: 'Get Dispute Status',
1590
+ ep_domain_score: 'Get Domain Trust Score',
1591
+ ep_generate_zk_proof: 'Generate ZK Trust Proof',
1592
+ ep_get_commit_status: 'Get Commit Status',
1593
+ ep_get_handshake: 'Get Handshake',
1594
+ ep_guard_action: 'Guard Irreversible Action (Human Signoff)',
1595
+ ep_initiate_handshake: 'Initiate Trust Handshake',
1596
+ ep_install_preflight: 'Installation Preflight Check',
1597
+ ep_issue_commit: 'Issue Pre-Action Commit',
1598
+ ep_leaderboard: 'Trust Leaderboard',
1599
+ ep_lineage: 'Get Entity Lineage',
1600
+ ep_list_policies: 'List Trust Policies',
1601
+ ep_principal_lookup: 'Look Up Principal',
1602
+ ep_register_entity: 'Register Entity',
1603
+ ep_report_trust_issue: 'Report Trust Issue',
1604
+ ep_revoke_commit: 'Revoke Commit',
1605
+ ep_revoke_handshake: 'Revoke Handshake',
1606
+ ep_search_entities: 'Search Entities',
1607
+ ep_submit_receipt: 'Submit Transaction Receipt',
1608
+ ep_trust_evaluate: 'Evaluate Trust Policy',
1609
+ ep_trust_gate: 'Trust Gate Decision',
1610
+ ep_trust_profile: 'Get Trust Profile',
1611
+ ep_verify_commit: 'Verify Commit',
1612
+ ep_verify_delegation: 'Verify Delegation',
1613
+ ep_verify_handshake: 'Verify Handshake',
1614
+ ep_verify_receipt: 'Verify Trust Receipt',
1615
+ ep_verify_zk_proof: 'Verify ZK Trust Proof',
1616
+ };
1617
+ function withAnnotations(tool) {
1618
+ return {
1619
+ ...tool,
1620
+ annotations: {
1621
+ title: TOOL_TITLES[tool.name] || tool.name,
1622
+ readOnlyHint: READ_ONLY_TOOLS.has(tool.name),
1623
+ destructiveHint: DESTRUCTIVE_TOOLS.has(tool.name),
1624
+ openWorldHint: false, // every tool talks only to the configured EP API
1625
+ },
1626
+ };
1627
+ }
1628
+
1629
+ const ADVERTISED_TOOLS = (INCLUDE_REGISTRY_TOOLS
1566
1630
  ? TOOLS
1567
- : TOOLS.filter((t) => CORE_TOOL_NAMES.has(t.name));
1631
+ : TOOLS.filter((t) => CORE_TOOL_NAMES.has(t.name))
1632
+ ).map(withAnnotations);
1568
1633
 
1569
1634
  server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: ADVERTISED_TOOLS }));
1570
1635
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@emilia-protocol/mcp-server",
3
3
  "mcpName": "io.github.emiliaprotocol/mcp-server",
4
- "version": "1.0.3",
4
+ "version": "1.0.4",
5
5
  "description": "EMILIA Protocol MCP Server — trust enforcement for high-risk actions via MCP. Pre-action binding, policy-bound verification, and accountable human signoff.",
6
6
  "main": "index.js",
7
7
  "type": "module",