MongoDB · Capability
MongoDB Atlas Administration API — Query Shape Insights
MongoDB Atlas Administration API — Query Shape Insights. 5 operations. Lead operation: Return Query Statistic Summaries. Self-contained Naftiko capability covering one Mongodb business surface.
What You Can Do
GET
Listgroupclusterqueryshapeinsightsummaries
— Return Query Statistic Summaries
/v1/api/atlas/v2/groups/{groupid}/clusters/{clustername}/queryshapeinsights/summaries
GET
Getgroupclusterqueryshapeinsightdetails
— Return Query Shape Details
/v1/api/atlas/v2/groups/{groupid}/clusters/{clustername}/queryshapeinsights/{queryshapehash}/details
GET
Listgroupclusterqueryshapes
— Return All Query Shapes
/v1/api/atlas/v2/groups/{groupid}/clusters/{clustername}/queryshapes
GET
Getgroupclusterqueryshape
— Return One Query Shape
/v1/api/atlas/v2/groups/{groupid}/clusters/{clustername}/queryshapes/{queryshapehash}
PATCH
Updategroupclusterqueryshape
— Update Query Shape Rejection Status
/v1/api/atlas/v2/groups/{groupid}/clusters/{clustername}/queryshapes/{queryshapehash}
MCP Tools
return-query-statistic-summaries
Return Query Statistic Summaries
read-only
idempotent
return-query-shape-details
Return Query Shape Details
read-only
idempotent
return-all-query-shapes
Return All Query Shapes
read-only
idempotent
return-one-query-shape
Return One Query Shape
read-only
idempotent
update-query-shape-rejection-status
Update Query Shape Rejection Status
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: MongoDB Atlas Administration API — Query Shape Insights
description: 'MongoDB Atlas Administration API — Query Shape Insights. 5 operations. Lead operation: Return Query Statistic
Summaries. Self-contained Naftiko capability covering one Mongodb business surface.'
tags:
- Mongodb
- Query Shape Insights
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
MONGODB_API_KEY: MONGODB_API_KEY
capability:
consumes:
- type: http
namespace: atlas-query-shape-insights
baseUri: https://cloud.mongodb.com
description: MongoDB Atlas Administration API — Query Shape Insights business capability. Self-contained, no shared references.
resources:
- name: api-atlas-v2-groups-groupId-clusters-clusterName-queryShapeInsights-summaries
path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapeInsights/summaries
operations:
- name: listgroupclusterqueryshapeinsightsummaries
method: GET
description: Return Query Statistic Summaries
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: clusterName
in: path
type: string
description: Human-readable label that identifies the cluster.
required: true
- name: since
in: query
type: integer
description: 'Date and time from which to retrieve query shape statistics. This parameter expresses its value in
the number of milliseconds that have elapsed since the [UNIX '
- name: until
in: query
type: integer
description: Date and time up until which to retrieve query shape statistics. This parameter expresses its value
in the number of milliseconds that have elapsed since the [U
- name: processIds
in: query
type: array
description: Process IDs from which to retrieve query shape statistics. A `processId` is a combination of host and
port that serves the MongoDB process. The host must be the
- name: namespaces
in: query
type: array
description: 'Namespaces from which to retrieve query shape statistics. A namespace consists of one database and
one collection resource written as `.`: `<database>.<collecti'
- name: commands
in: query
type: array
description: Retrieve query shape statistics matching specified MongoDB commands. To include multiple commands,
pass the parameter multiple times delimited with an ampersand
- name: nSummaries
in: query
type: integer
description: Maximum number of query statistic summaries to return.
- name: series
in: query
type: array
description: Query shape statistics data series to retrieve. A series represents a specific metric about query execution.
To include multiple series, pass the parameter mult
- name: queryShapeHashes
in: query
type: array
description: A list of SHA256 hashes of desired query shapes, output by MongoDB commands like `$queryStats` and
$explain or slow query logs. To include multiple series, pass
- name: api-atlas-v2-groups-groupId-clusters-clusterName-queryShapeInsights-queryShapeHa
path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapeInsights/{queryShapeHash}/details
operations:
- name: getgroupclusterqueryshapeinsightdetails
method: GET
description: Return Query Shape Details
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: clusterName
in: path
type: string
description: Human-readable label that identifies the cluster.
required: true
- name: since
in: query
type: integer
description: 'Date and time from which to retrieve query shape statistics. This parameter expresses its value in
the number of milliseconds that have elapsed since the [UNIX '
- name: until
in: query
type: integer
description: Date and time up until which to retrieve query shape statistics. This parameter expresses its value
in the number of milliseconds that have elapsed since the [U
- name: processIds
in: query
type: array
description: Process IDs from which to retrieve query shape statistics. A `processId` is a combination of host and
port that serves the MongoDB process. The host must be the
- name: queryShapeHash
in: path
type: string
description: A SHA256 hash of a query shape, output by MongoDB commands like `$queryStats` and `$explain` or slow
query logs.
required: true
- name: api-atlas-v2-groups-groupId-clusters-clusterName-queryShapes
path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes
operations:
- name: listgroupclusterqueryshapes
method: GET
description: Return All Query Shapes
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: clusterName
in: path
type: string
description: Human-readable label that identifies the cluster.
required: true
- name: status
in: query
type: string
description: The status of query shapes to retrieve. Only REJECTED status is supported. If omitted, defaults to
REJECTED.
- name: api-atlas-v2-groups-groupId-clusters-clusterName-queryShapes-queryShapeHash
path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/queryShapes/{queryShapeHash}
operations:
- name: getgroupclusterqueryshape
method: GET
description: Return One Query Shape
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: clusterName
in: path
type: string
description: Human-readable label that identifies the cluster.
required: true
- name: queryShapeHash
in: path
type: string
description: A SHA256 hash of a query shape, output by MongoDB commands like `$queryStats` and `$explain` or slow
query logs.
required: true
- name: updategroupclusterqueryshape
method: PATCH
description: Update Query Shape Rejection Status
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: clusterName
in: path
type: string
description: Human-readable label that identifies the cluster.
required: true
- name: queryShapeHash
in: path
type: string
description: A SHA256 hash of a query shape, output by MongoDB commands like `$queryStats` and `$explain` or slow
query logs.
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: true
authentication:
type: bearer
token: '{{env.MONGODB_API_KEY}}'
exposes:
- type: rest
namespace: atlas-query-shape-insights-rest
port: 8080
description: REST adapter for MongoDB Atlas Administration API — Query Shape Insights. One Spectral-compliant resource
per consumed operation, prefixed with /v1.
resources:
- path: /v1/api/atlas/v2/groups/{groupid}/clusters/{clustername}/queryshapeinsights/summaries
name: api-atlas-v2-groups-groupid-clusters-clustername-queryshapeinsights-summaries
description: REST surface for api-atlas-v2-groups-groupId-clusters-clusterName-queryShapeInsights-summaries.
operations:
- method: GET
name: listgroupclusterqueryshapeinsightsummaries
description: Return Query Statistic Summaries
call: atlas-query-shape-insights.listgroupclusterqueryshapeinsightsummaries
with:
clusterName: rest.clusterName
since: rest.since
until: rest.until
processIds: rest.processIds
namespaces: rest.namespaces
commands: rest.commands
nSummaries: rest.nSummaries
series: rest.series
queryShapeHashes: rest.queryShapeHashes
outputParameters:
- type: object
mapping: $.
- path: /v1/api/atlas/v2/groups/{groupid}/clusters/{clustername}/queryshapeinsights/{queryshapehash}/details
name: api-atlas-v2-groups-groupid-clusters-clustername-queryshapeinsights-queryshapeha
description: REST surface for api-atlas-v2-groups-groupId-clusters-clusterName-queryShapeInsights-queryShapeHa.
operations:
- method: GET
name: getgroupclusterqueryshapeinsightdetails
description: Return Query Shape Details
call: atlas-query-shape-insights.getgroupclusterqueryshapeinsightdetails
with:
clusterName: rest.clusterName
since: rest.since
until: rest.until
processIds: rest.processIds
queryShapeHash: rest.queryShapeHash
outputParameters:
- type: object
mapping: $.
- path: /v1/api/atlas/v2/groups/{groupid}/clusters/{clustername}/queryshapes
name: api-atlas-v2-groups-groupid-clusters-clustername-queryshapes
description: REST surface for api-atlas-v2-groups-groupId-clusters-clusterName-queryShapes.
operations:
- method: GET
name: listgroupclusterqueryshapes
description: Return All Query Shapes
call: atlas-query-shape-insights.listgroupclusterqueryshapes
with:
clusterName: rest.clusterName
status: rest.status
outputParameters:
- type: object
mapping: $.
- path: /v1/api/atlas/v2/groups/{groupid}/clusters/{clustername}/queryshapes/{queryshapehash}
name: api-atlas-v2-groups-groupid-clusters-clustername-queryshapes-queryshapehash
description: REST surface for api-atlas-v2-groups-groupId-clusters-clusterName-queryShapes-queryShapeHash.
operations:
- method: GET
name: getgroupclusterqueryshape
description: Return One Query Shape
call: atlas-query-shape-insights.getgroupclusterqueryshape
with:
clusterName: rest.clusterName
queryShapeHash: rest.queryShapeHash
outputParameters:
- type: object
mapping: $.
- method: PATCH
name: updategroupclusterqueryshape
description: Update Query Shape Rejection Status
call: atlas-query-shape-insights.updategroupclusterqueryshape
with:
clusterName: rest.clusterName
queryShapeHash: rest.queryShapeHash
body: rest.body
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: atlas-query-shape-insights-mcp
port: 9090
transport: http
description: MCP adapter for MongoDB Atlas Administration API — Query Shape Insights. One tool per consumed operation,
routed inline through this capability's consumes block.
tools:
- name: return-query-statistic-summaries
description: Return Query Statistic Summaries
hints:
readOnly: true
destructive: false
idempotent: true
call: atlas-query-shape-insights.listgroupclusterqueryshapeinsightsummaries
with:
clusterName: tools.clusterName
since: tools.since
until: tools.until
processIds: tools.processIds
namespaces: tools.namespaces
commands: tools.commands
nSummaries: tools.nSummaries
series: tools.series
queryShapeHashes: tools.queryShapeHashes
outputParameters:
- type: object
mapping: $.
- name: return-query-shape-details
description: Return Query Shape Details
hints:
readOnly: true
destructive: false
idempotent: true
call: atlas-query-shape-insights.getgroupclusterqueryshapeinsightdetails
with:
clusterName: tools.clusterName
since: tools.since
until: tools.until
processIds: tools.processIds
queryShapeHash: tools.queryShapeHash
outputParameters:
- type: object
mapping: $.
- name: return-all-query-shapes
description: Return All Query Shapes
hints:
readOnly: true
destructive: false
idempotent: true
call: atlas-query-shape-insights.listgroupclusterqueryshapes
with:
clusterName: tools.clusterName
status: tools.status
outputParameters:
- type: object
mapping: $.
- name: return-one-query-shape
description: Return One Query Shape
hints:
readOnly: true
destructive: false
idempotent: true
call: atlas-query-shape-insights.getgroupclusterqueryshape
with:
clusterName: tools.clusterName
queryShapeHash: tools.queryShapeHash
outputParameters:
- type: object
mapping: $.
- name: update-query-shape-rejection-status
description: Update Query Shape Rejection Status
hints:
readOnly: false
destructive: false
idempotent: true
call: atlas-query-shape-insights.updategroupclusterqueryshape
with:
clusterName: tools.clusterName
queryShapeHash: tools.queryShapeHash
body: tools.body
outputParameters:
- type: object
mapping: $.