Skip to content

Commit 96eb301

Browse files
committed
saving work
1 parent 53cae3a commit 96eb301

2 files changed

Lines changed: 31 additions & 6 deletions

File tree

tests/integration/all-resource-types/bicep/source-apim.bicep

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -971,17 +971,19 @@ resource apiMcpExistingServer 'Microsoft.ApiManagement/service/apis@2025-09-01-p
971971
})
972972
}
973973

974-
// 8b. Policy-based MCP server exposing DummyJSON todo tools
974+
// 8b. MCP server exposing the DummyJSON todo operations of src-rest-openapi
975975
// Kept on its own API (separate from the Petstore tools on src-mcp-from-api) so
976-
// the two tool sets are isolated. The MCP behaviour is implemented entirely in
977-
// the api-level policy (mcpTodosPolicyXml in source-apim-post-activation.bicep),
978-
// so no mcpTools or backend are required here.
976+
// the two tool sets are isolated. An MCP API must set exactly one of mcpTools or
977+
// backendId; here the todo operations of src-rest-openapi are surfaced as tools.
978+
// The api-level policy (mcpTodosPolicyXml in source-apim-post-activation.bicep)
979+
// implements the JSON-RPC behaviour against DummyJSON.
979980
resource apiMcpTodos 'Microsoft.ApiManagement/service/apis@2025-09-01-preview' = {
980981
parent: apim
981982
name: 'src-mcp-todos'
983+
dependsOn: [apiRestOpenapi]
982984
properties: any({
983985
displayName: 'KS MCP Todos Server'
984-
description: 'Policy-based MCP server exposing DummyJSON todo tools (listItems, getItem, createItem, healthCheck)'
986+
description: 'MCP server exposing DummyJSON todo tools (listItems, getItem, createItem, healthCheck)'
985987
path: 'ks/mcp-todos'
986988
protocols: ['https']
987989
subscriptionRequired: false
@@ -993,6 +995,28 @@ resource apiMcpTodos 'Microsoft.ApiManagement/service/apis@2025-09-01-preview' =
993995
}
994996
}
995997
}
998+
mcpTools: [
999+
{
1000+
name: 'listItems'
1001+
description: 'List todo items'
1002+
operationId: resourceId('Microsoft.ApiManagement/service/apis/operations', apimName, 'src-rest-openapi', 'listItems')
1003+
}
1004+
{
1005+
name: 'getItem'
1006+
description: 'Get a todo item by id'
1007+
operationId: resourceId('Microsoft.ApiManagement/service/apis/operations', apimName, 'src-rest-openapi', 'getItem')
1008+
}
1009+
{
1010+
name: 'createItem'
1011+
description: 'Create a todo item'
1012+
operationId: resourceId('Microsoft.ApiManagement/service/apis/operations', apimName, 'src-rest-openapi', 'createItem')
1013+
}
1014+
{
1015+
name: 'healthCheck'
1016+
description: 'Return APIM MCP server health'
1017+
operationId: resourceId('Microsoft.ApiManagement/service/apis/operations', apimName, 'src-rest-openapi', 'healthCheck')
1018+
}
1019+
]
9961020
})
9971021
}
9981022

tests/integration/all-resource-types/expected-structure.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,8 @@
628628
"properties.subscriptionRequired": false
629629
},
630630
"mcpServerInformation.json": {
631-
"properties.mcpProperties.endpoints.mcp.uriTemplate": "/mcp"
631+
"properties.mcpProperties.endpoints.mcp.uriTemplate": "/mcp",
632+
"properties.mcpTools": "exists"
632633
}
633634
},
634635
"notes": "Policy-based MCP server exposing DummyJSON todo tools (listItems, getItem, createItem, healthCheck), kept separate from the Petstore tools on src-mcp-from-api"

0 commit comments

Comments
 (0)