Skip to main content
Glama

get_adr_graph

Visualize ADR dependency relationships to understand decision impacts and connections across your architecture documentation.

Instructions

Visualize ADR dependency graph. Optionally scope to a single ADR.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
adr_idNoFocus on a specific ADR (omit for full graph)

Implementation Reference

  • The implementation of the get_adr_graph tool handler, which retrieves and formats ADR relations as a text-based graph.
    }, async ({ adr_id }) => {
      const relations = adr_id ? getADRRelations(adr_id) : getAllRelations();
    
      if (!relations.length) {
        return { content: [{ type: 'text', text: 'No relations found. Use link_adrs to connect ADRs.' }] };
      }
    
      const ICONS = { related_to: '↔', conflicts_with: '✕', depends_on: '→' };
    
      // Build adjacency list grouped by relation type
      const groups = {};
      for (const r of relations) {
        const label = r.relation.replace(/_/g, ' ');
        if (!groups[label]) groups[label] = [];
        groups[label].push(
          `  ADR-${r.from_id} "${r.from_title}"  ${ICONS[r.relation] ?? '-'}  ADR-${r.to_id} "${r.to_title}"`
        );
      }
    
      const output = Object.entries(groups)
        .map(([label, lines]) => `### ${label}\n${lines.join('\n')}`)
        .join('\n\n');
    
      return { content: [{ type: 'text', text: `## ADR Dependency Graph\n\n${output}` }] };
    });
  • index.js:209-213 (registration)
    Registration of the get_adr_graph tool, including its description and input schema.
    server.registerTool('get_adr_graph', {
      description: 'Visualize ADR dependency graph. Optionally scope to a single ADR.',
      inputSchema: {
        adr_id: z.number().optional().describe('Focus on a specific ADR (omit for full graph)'),
      },

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/wooxogh/adr-mcp-setup'

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