diff --git a/src/parser/extract-tools.ts b/src/parser/extract-tools.ts index 6371623..cc0d7bb 100644 --- a/src/parser/extract-tools.ts +++ b/src/parser/extract-tools.ts @@ -90,6 +90,8 @@ export function extractToolsFromApi( const securityRequirements = operation.security === null ? globalSecurity : operation.security || globalSecurity; + const deprecated = operation.deprecated || false; + // Create the tool definition tools.push({ name: finalToolName, @@ -102,6 +104,7 @@ export function extractToolsFromApi( requestBodyContentType, securityRequirements, operationId: baseName, + deprecated, }); } } diff --git a/src/types/index.ts b/src/types/index.ts index e36eb3b..d0e6337 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -62,6 +62,8 @@ export interface McpToolDefinition { securityRequirements: OpenAPIV3.SecurityRequirementObject[]; /** Original operation ID from the OpenAPI spec */ operationId: string; + /** OpenAPI deprecated attribute **/ + deprecated: boolean; } /**