Azure / Azure/data-api-builder
[Enh]: add `query_graphql` DML tool to MCP server
Đang mở
Chưa có ai nhận issue này.
2.3
needs discussion
- Ngôn ngữ chính
- C#
- Star
- 1.5k
- Fork
- 372
- Merge trung bình
- 3 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 9
Mô tả
What?
Allow agents to make complex queries that include join operations.
Why?
Join operations allow agents to retrieve related information across entities, enabling richer reasoning and discovery scenarios that single-entity queries cannot provide.
How?
Expose a single GraphQL MCP tool whose behavior is controlled by an enum parameter.
Example tool signature
{
"name": "query_graphql",
"description": "Execute read-only GraphQL queries against the Data API builder. Supports joins across related entities, filtering, ordering, pagination (first/after), primary-key lookups, and aggregation/groupBy. Use operation 'schema' first to discover entity types, relationships, and available query fields. Then use operation 'query' with a GraphQL query document. NOTE: This tool is read-only; mutations are not supported.",
"input_schema": {
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": ["query", "schema"],
"description": "Use 'query' to execute a read-only GraphQL query. Use 'schema' to retrieve available types, relationships, and query fields."
},
"query": {
"type": "string",
"description": "The GraphQL query document. Required when operation is 'query'. Must be a query operation; mutations are rejected."
},
"variables": {
"type": "object",
"description": "Optional variables for parameterized GraphQL queries."
},
"operationName": {
"type": "string",
"description": "Name of the operation to execute when the query document contains multiple named operations."
}
},
"required": ["operation"]
}
}
Behavior.
operation = query
Execute the provided GraphQL query.
operation = mutation
Execute the provided GraphQL mutation.
operation = schema
Return the GraphQL schema or a simplified schema description.
Example schema request
{
"operation": "schema"
}
Example query request
{
"operation": "query",
"query": "query { products(first:5) { productId name category { name } } }"
}
Example mutation request
{
"operation": "mutation",
"query": "mutation { createProduct(item:{ name:\"Widget\" }) { productId name } }"
}
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.