Skip to main content
Glama

update_adr_status

Change the lifecycle status of an Architecture Decision Record (ADR) from Proposed to Accepted, Deprecated, or Superseded to track decision evolution.

Instructions

Update the status of an ADR: Proposed → Accepted → Deprecated → Superseded

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
adr_idYesADR ID to update
statusYesNew status
superseded_byNoID of the replacing ADR (required when status is Superseded)

Implementation Reference

  • The 'update_adr_status' tool registration and handler implementation in the MCP server.
    server.registerTool('update_adr_status', {
      description: 'Update the status of an ADR: Proposed → Accepted → Deprecated → Superseded',
      inputSchema: {
        adr_id:        z.number().describe('ADR ID to update'),
        status:        z.enum(['Proposed', 'Accepted', 'Deprecated', 'Superseded']).describe('New status'),
        superseded_by: z.number().optional().describe('ID of the replacing ADR (required when status is Superseded)'),
      },
    }, async ({ adr_id, status, superseded_by }) => {
      const adr = getADR(adr_id);
      if (!adr) throw new Error(`ADR ${adr_id} not found`);
      if (status === 'Superseded' && !superseded_by) {
        throw new Error('superseded_by is required when setting status to Superseded');
      }
    
      updateADRStatus(adr_id, status, superseded_by ?? null);
    
      const updated = { ...adr, status, superseded_by: superseded_by ?? null };
      exportADRFile(adr_id, updated, adr.session_id);
    
      const note = superseded_by ? ` (superseded by ADR-${superseded_by})` : '';
      return { content: [{ type: 'text', text: `ADR-${adr_id} updated to "${status}"${note}` }] };
    });
  • db.js:72-75 (helper)
    The database helper function 'updateADRStatus' that performs the SQL update.
    export function updateADRStatus(id, status, superseded_by = null) {
      db.prepare('UPDATE adrs SET status = ?, superseded_by = ? WHERE id = ?')
        .run(status, superseded_by, id);
    }

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