Skip to main content
Glama
ennuiii

Azure DevOps MCP Server with PAT Authentication

by ennuiii

advsec_get_alert_details

Retrieve detailed information for a specific Advanced Security alert in Azure DevOps by specifying project, repository, and alert ID using PAT authentication.

Instructions

Get detailed information about a specific Advanced Security alert.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
alertIdYesThe ID of the alert to retrieve details for.
projectYesThe name or ID of the Azure DevOps project.
refNoGit reference (branch) to filter the alert.
repositoryYesThe name or ID of the repository containing the alert.

Implementation Reference

  • Handler function that executes the tool logic: fetches detailed alert information from Azure DevOps Alert API.
    async ({ project, repository, alertId, ref }) => { try { const connection = await connectionProvider(); const alertApi = await connection.getAlertApi(); const result = await alertApi.getAlert( project, alertId, repository, ref, undefined // expand parameter ); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : "Unknown error occurred"; return { content: [ { type: "text", text: `Error fetching alert details: ${errorMessage}`, }, ], isError: true, }; } } );
  • Zod input schema defining parameters for the advsec_get_alert_details tool.
    { project: z.string().describe("The name or ID of the Azure DevOps project."), repository: z.string().describe("The name or ID of the repository containing the alert."), alertId: z.number().describe("The ID of the alert to retrieve details for."), ref: z.string().optional().describe("Git reference (branch) to filter the alert."), },
  • Tool registration using server.tool() in configureAdvSecTools function, which is called from src/tools.ts.
    server.tool( ADVSEC_TOOLS.get_alert_details, "Get detailed information about a specific Advanced Security alert.", { project: z.string().describe("The name or ID of the Azure DevOps project."), repository: z.string().describe("The name or ID of the repository containing the alert."), alertId: z.number().describe("The ID of the alert to retrieve details for."), ref: z.string().optional().describe("Git reference (branch) to filter the alert."), }, async ({ project, repository, alertId, ref }) => { try { const connection = await connectionProvider(); const alertApi = await connection.getAlertApi(); const result = await alertApi.getAlert( project, alertId, repository, ref, undefined // expand parameter ); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : "Unknown error occurred"; return { content: [ { type: "text", text: `Error fetching alert details: ${errorMessage}`, }, ], isError: true, }; } } ); }
  • Constant defining the tool name string for advsec_get_alert_details.
    const ADVSEC_TOOLS = { get_alerts: "advsec_get_alerts", get_alert_details: "advsec_get_alert_details", };

Other Tools

Related 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/ennuiii/DevOpsMcpPAT'

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