tool: expose the deprecated attribute
Expose the `deprecated` attribute and default to `false`.
This commit is contained in:
parent
8ee9fc383d
commit
1d9a8d8af6
@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,6 +62,8 @@ export interface McpToolDefinition {
|
||||
securityRequirements: OpenAPIV3.SecurityRequirementObject[];
|
||||
/** Original operation ID from the OpenAPI spec */
|
||||
operationId: string;
|
||||
/** OpenAPI deprecated attribute **/
|
||||
deprecated: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user