igrid-sce-mcp-tool
igrid-sce-mcp-tool v4 — 读取 / 写入 / 管理
用于现有 iGrid-Prometheus REST API 的 Node.js/JavaScript MCP 集成层。iGrid 后端和现有的八个工具拆分保持不变;此版本在 MCP 工具级别添加了基于 SAP BTP XSUAA 角色的授权。
授权模型
该项目现在定义了三个 XSUAA 作用域、三个角色模板和三个预定义角色集合:
角色集合 | 角色模板 | 作用域 | 允许的 MCP 操作 |
|
|
| 仅 GET/读取工具 |
|
|
| 仅 POST/写入工具 |
|
|
| 全部八个工具 |
授权检查在公共 MCP toolHandler 中执行,在任何下游 iGrid API 请求之前。缺少所需作用域的用户将收到 Forbidden: MCP 工具错误。
Related MCP server: agent-sudo-mcp
恰好 8 个 MCP 工具
Bearer 组 — src/tools/bearer-tools.js
igrid_list_domains→GET /api/hub/datasets→ 读取/管理igrid_get_template→GET /api/hub/template/:domain→ 读取/管理igrid_run_agent→POST /api/ai/run→ 写入/管理igrid_propose_action→POST /api/ai/action/propose→ 写入/管理igrid_decide_action→POST /api/ai/action/decide→ 写入/管理igrid_metrics→GET /api/ai/metrics→ 读取/管理
x-api-key 组 — src/tools/api-key-tools.js
igrid_ingest_csv→POST /api/ingest/:domain→ 写入/管理igrid_export_csv→GET /api/export/:domain→ 读取/管理
igrid_propose_action 被有意归类为写入,因为请求的授权规则基于实际的 HTTP 操作,且此工具使用 POST。
不公开 igrid_health MCP 工具。/healthz 仅保留为应用程序健康端点。
现有下游 iGrid 行为保持不变
六个工具继续使用 iGrid Bearer/服务会话。
igrid_ingest_csv和igrid_export_csv继续使用 iGridx-api-key通道。未引入 Destination 或 Connectivity 服务。
未硬编码任何凭据或密钥。
重要文件
xs-security.json XSUAA scopes, role templates, role collections
src/auth/xsuaa.js XSUAA authentication + OAuth metadata
src/auth/authorization.js Read/Write/Admin authorization checks
src/context/auth-context.js Per-request auth context propagation
src/tools/response.js Common MCP tool-level enforcement
src/tools/bearer-tools.js 6 Bearer tools and permission mapping
src/tools/api-key-tools.js 2 x-api-key tools and permission mapping环境
IGRID_BASE_URL=https://igrid-prometheus.azurewebsites.net
IGRID_API_KEY=<IGRID_API_KEY>
IGRID_BEARER_TOKEN=<optional pre-issued iGrid Bearer>
IGRID_SERVICE_EMAIL=<optional approved iGrid service email>
IGRID_SERVICE_PASSWORD=<optional approved iGrid service password>
IGRID_MFA_CODE=<optional MFA code>
IGRID_MFA_BODY_JSON=<approved MFA JSON body using {{code}}>
IGRID_REQUEST_TIMEOUT_MS=30000
MCP_TRANSPORT=http
MCP_HOST=0.0.0.0
MCP_PORT=8080
MCP_PATH=/mcp
# Local stdio / local HTTP test authorization only.
# Ignored for a hosted request authenticated through XSUAA.
MCP_LOCAL_ROLE=Admin
MCP_HTTP_AUTH_TOKEN=对于 Bearer 工具,优先使用预先颁发的 IGRID_BEARER_TOKEN。如果不存在,现有的令牌管理器可以在提供所需 MFA 配置的情况下使用已批准的 iGrid 登录/MFA 契约。
构建
npm install
npm run check
npm run security:check
npm test
npx mbt build -t mta_archivesBTP 部署
cf login
cf target -o <ORG> -s <SPACE>
cf deploy mta_archives/igrid-sce-mcp-tool_4.0.0.mtar -f部署后设置 iGrid 密钥:
cf set-env igrid-sce-mcp-tool IGRID_API_KEY '<IGRID_API_KEY>'
cf set-env igrid-sce-mcp-tool IGRID_BEARER_TOKEN '<IGRID_BEARER_TOKEN>'
cf restart igrid-sce-mcp-tool或者,当使用已批准的服务登录/MFA 流程时:
cf set-env igrid-sce-mcp-tool IGRID_SERVICE_EMAIL '<SERVICE_EMAIL>'
cf set-env igrid-sce-mcp-tool IGRID_SERVICE_PASSWORD '<SERVICE_PASSWORD>'
cf set-env igrid-sce-mcp-tool IGRID_MFA_BODY_JSON '<APPROVED_JSON_WITH_{{code}}>'
cf restart igrid-sce-mcp-toolXSUAA 角色分配
部署会根据 xs-security.json 创建/更新 XSUAA 服务实例 igrid-sce-mcp-tool-xsuaa。
部署后,在 SAP BTP 子账户中:
打开 安全 → 角色集合。
确认预定义的集合
iGrid-MCP-Read、iGrid-MCP-Write和iGrid-MCP-Admin存在。将
iGrid-MCP-Read分配给只读用户。将
iGrid-MCP-Write分配给只写用户。仅将
iGrid-MCP-Admin分配给需要同时使用 GET 和 POST MCP 工具的用户。重新认证 MCP 客户端,使其新令牌包含已分配的作用域。
如果用户只有读取权限,POST 工具将在 MCP 层失败。如果用户只有写入权限,GET 工具将失败。管理员可以调用全部八个工具。
OAuth / Claude 远程 MCP
使用已部署的端点:
https://<BTP_ROUTE>/mcpOAuth 发现元数据现在会公布 XSUAA 的 read、write 和 admin 作用域。对于用户特定的角色强制执行,请使用能生成用户令牌的 OAuth 流程(通常是授权码),以便用户的 BTP 角色集合在令牌中得以体现。
服务密钥仍然可以提供 XSUAA OAuth 客户端凭据,但 client_credentials 令牌是技术客户端身份,不应被视为继承了人类用户的角色集合。
本地 stdio
本地 stdio 没有 BTP 用户 JWT,因此角色行为通过 MCP_LOCAL_ROLE 模拟。默认值为 Admin,以保留之前的本地行为。
只读本地测试:
MCP_LOCAL_ROLE=Read npm run start:stdio只写本地测试:
MCP_LOCAL_ROLE=Write npm run start:stdio完整本地测试:
MCP_LOCAL_ROLE=Admin npm run start:stdioClaude Desktop/Code 示例:
{
"mcpServers": {
"igrid-sce-mcp-tool": {
"command": "node",
"args": ["/ABSOLUTE/PATH/igrid-sce-mcp-tool/src/server.js"],
"env": {
"MCP_TRANSPORT": "stdio",
"MCP_LOCAL_ROLE": "Read",
"IGRID_BASE_URL": "https://igrid-prometheus.azurewebsites.net",
"IGRID_API_KEY": "<IGRID_API_KEY>",
"IGRID_BEARER_TOKEN": "<IGRID_BEARER_TOKEN>"
}
}
}
}角色验收测试
使用三个用户(或三个用户角色分配),并在每次分配后获取新令牌。
读取用户
预期成功:
igrid_list_domains
igrid_get_template
igrid_metrics
igrid_export_csv预期 Forbidden::
igrid_run_agent
igrid_propose_action
igrid_decide_action
igrid_ingest_csv写入用户
预期成功:
igrid_run_agent
igrid_propose_action
igrid_decide_action
igrid_ingest_csv预期 Forbidden::
igrid_list_domains
igrid_get_template
igrid_metrics
igrid_export_csv管理员用户
全部八个工具应通过 MCP 角色检查。下游 iGrid 身份验证/授权和请求验证仍然适用。
安全说明
权限检查在 iGrid API 调用之前执行。
XSUAA 控制入站 MCP 权限;iGrid 对下游凭据和业务授权保持权威。
切勿将 iGrid API 密钥、iGrid 密码、Bearer 令牌、XSUAA 客户端密钥或服务密钥放入源代码管理。
有关简洁的安全模型,请参阅
README-SECURITY.md。
Available Tools
8 toolsigrid_decide_actionDecide governed actionADestructive
WRITE role: approve or reject a previously proposed action. Requires explicit humanConfirmed=true; iGrid remains authoritative for downstream authorization.
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| request | No | ||
| decision | Yes | ||
| selectedIds | No | ||
| humanConfirmed | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations declare destructiveHint=true, which the description reinforces by stating this is a 'WRITE role' action. The description adds critical behavioral info: the need for humanConfirmed=true and iGrid's downstream authorization authority, which goes beyond what annotations alone provide.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences that front-load the key message ('WRITE role') and critical constraint. Every sentence adds value, but some parameter details are missing, and the description could be slightly more efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 5 parameters (2 required), 0% schema coverage, no output schema, and a destructive action, the description covers the core governance constraint but omits important details: what 'note' is used for, how 'selectedIds' relates to the action, and what the tool returns upon success or failure.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate. It adds meaning for 'humanConfirmed' (requires true) and implies intent for 'decision' (approve/reject). However, it does not explain other parameters like 'note', 'request', or 'selectedIds', leaving gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses specific verbs ('approve or reject') and identifies the resource ('previously proposed action'). It distinguishes from siblings like igrid_propose_action by focusing on the decision step.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly warns that 'humanConfirmed=true' is required and mentions downstream authorization by iGrid, providing clear usage context. However, it does not explicitly list when not to use this tool or name alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
igrid_export_csvExport governed CSVCRead-only
READ role: export an iGrid domain through GET /api/export/:domain using the documented x-api-key M2M endpoint.
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description aligns with annotations (readOnlyHint=true, destructiveHint=false) and adds context about the authentication method (x-api-key M2M) and endpoint. However, it does not disclose additional behavioral traits such as response format, size limits, or error handling beyond what annotations already provide.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no wasted words, and the 'READ role:' prefix is front-loaded. However, it could be more structurally organized (e.g., separate usage notes from technical details).
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With only one parameter and no output schema, the description provides the endpoint and auth method but omits critical details: the output format (CSV), success/error responses, prerequisites (e.g., listing domains first), and typical usage context. This leaves the agent underinformed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage for the single required parameter 'domain'. The description does not elaborate on the parameter's meaning, constraints, or format beyond the endpoint path hint. Since coverage is low, the description should compensate, but it fails to do so.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'export' and resource 'iGrid domain', and specifies the HTTP method and endpoint. However, it does not explicitly distinguish from sibling tools like igrid_ingest_csv (import) or igrid_list_domains, and the title mentions 'CSV' but the description omits the output format.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The 'READ role' prefix hints at read-only usage, but there is no explicit comparison to siblings or conditions for use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
igrid_get_templateGet domain CSV templateARead-only
READ role: return the contract-accurate CSV template for an iGrid domain.
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare readOnlyHint=true and destructiveHint=false, so the agent knows this is a safe read operation. The description appropriately adds that the template is 'contract-accurate', which is meaningful behavioral context beyond the annotations—it implies the returned CSV matches a predefined contract schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that efficiently conveys the verb, output, context (contract-accurate), and resource (iGrid domain). Every word earns its place with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the low complexity (1 parameter, no output schema, simple return type), the description is mostly complete. It could mention whether the template is downloaded or returned as a string, but the phrase 'return the ... CSV template' implies the tool returns the template data.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It identifies the sole parameter 'domain' by stating 'for an iGrid domain'—this directly maps the parameter name to a meaningful concept (the iGrid domain). Though it doesn't elaborate on format, the mapping is clear and sufficient because there is only one required parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'return' with the resource 'CSV template for an iGrid domain', and clarifies the result is 'contract-accurate'. It also distinguishes from sibling tools like igrid_export_csv and igrid_ingest_csv by naming the specific artifact type (template, not data export or ingestion).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states the READ role requirement, implying authentication context, and the template name includes 'domain' which matches the sole required parameter. However, it does not explicitly state when an agent should use this tool versus alternatives like igrid_export_csv (to get template vs. export actual data) or igrid_ingest_csv (to import data).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
igrid_ingest_csvIngest CSV into iGridCDestructive
WRITE role: send CSV to iGrid through POST /api/ingest/:domain using the documented x-api-key M2M endpoint.
| Name | Required | Description | Default |
|---|---|---|---|
| csv | Yes | ||
| domain | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare destructiveHint=true, and the description adds 'WRITE role' and the HTTP method/endpoint, reinforcing the write nature. However, it does not explain what gets destroyed (e.g., overwrite? append?), error states, or idempotency. The added context is modest beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single efficient sentence with no wasted words. It front-loads the key action and role. However, the technical phrasing (POST /api/ingest/:domain) may be overly detailed for an agent not aware of the API structure.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has no output schema and two parameters, the description should cover return values (e.g., success status), error handling, and prerequisites (e.g., domain must exist). None of these are addressed. The description is too minimal to be fully usable by an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 0% description coverage, and the description does not explain the 'csv' or 'domain' parameters beyond the endpoint reference. No details on CSV format, size limits (present in schema but not repeated), domain validation, or usage constraints. The description fails to compensate for the missing schema documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'send CSV to iGrid through POST /api/ingest/:domain', which is a specific verb+resource action. It distinguishes from sibling tools like igrid_export_csv and igrid_list_domains. However, it does not clarify what 'ingest' accomplishes (e.g., load into grid, replace existing data), leaving the outcome ambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites (e.g., domain must exist), when not to use it, or how it compares to siblings like igrid_export_csv or igrid_run_agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
igrid_list_domainsList iGrid domainsARead-only
READ role: discover current iGrid hub datasets with counts and freshness.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint=true and destructiveHint=false. The description reinforces this with 'READ role' and adds useful behavioral context about the return content (counts and freshness), going beyond the annotations by specifying what the user will learn from the tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, tightly worded sentence that front-loads the read-only nature and immediately conveys the purpose. No unnecessary words or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless read-only list tool, the description is sufficiently complete. It specifies the type of data returned (datasets, counts, freshness) and the safety profile via annotations and 'READ role'. Without an output schema, this gives the agent a reasonable expectation of the result.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the schema fully covers the parameter space. The description adds no parameter details, but no parameters exist to describe, making the baseline 4 appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the verb 'discover' and clearly identifies the resource as 'current iGrid hub datasets' with specific output details (counts and freshness). This distinguishes it from sibling tools like igrid_ingest_csv or igrid_export_csv, which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies a read-only discovery use case, which is clear context. However, it does not explicitly state when to use this tool versus the alternatives, nor does it mention any exclusions or alternative tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
igrid_metricsGet iGrid AI metricsARead-only
READ role: return token/cost observability metrics for the iGrid AI assistant.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds value by specifying exactly what kind of data is returned ('token/cost observability metrics'), which goes beyond the annotations. No contradictions exist. For a tool with no parameters, this is sufficient behavioral disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that front-loads the read role and immediately states what is returned. Every word is necessary and informative. No wasted text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity (no parameters, no output schema, clear purpose), the description fully satisfies completeness. It tells the agent exactly what the tool does and what data it returns. Combined with sibling names, the agent can infer when to use it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, and schema description coverage is 100% trivially. Baseline for zero parameters is 4. The description does not need to add parameter details. It correctly omits any irrelevant parameter information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns 'token/cost observability metrics' for the iGrid AI assistant. The verb 'return' combined with the specific resource 'metrics' makes the purpose unambiguous. It naturally distinguishes from siblings like igrid_export_csv or igrid_run_agent, which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'READ role' hints that this is for read-only observation, but there is no explicit guidance on when to use this tool versus alternatives. For example, it does not say when to use this over igrid_list_domains or igrid_get_template. Usage context is implied by the tool name and title but not explicitly stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
igrid_propose_actionPropose governed actionA
WRITE role: submit a governed action proposal through POST /api/ai/action/propose. It remains a dry-run proposal and does not approve the action.
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations indicate it is not read-only and not destructive. The description adds that it is a dry-run proposal and does not approve, which is useful. However, it does not disclose potential side effects (e.g., whether the proposal is stored), the request structure, or error behavior, leaving gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, each carrying essential information: the action being performed and its non-approving nature. No wasted words, and key details are front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with one free-form object parameter and no output schema, the description should explain the expected structure of the request and the response. It only covers the high-level purpose and dry-run behavior, leaving the agent under-informed about how to use the input correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The only parameter 'request' has no schema description (0% coverage) and the tool description does not explain what the request object should contain. It merely mentions 'governed action proposal,' providing minimal guidance for the agent to construct a valid request.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('submit') and resource ('governed action proposal'), explicitly names the endpoint, and clearly distinguishes from siblings by stating it does not approve the action, which contrasts with igrid_decide_action.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It states the role ('WRITE role') and that it is a dry-run proposal, implying use for submission without approval. However, it does not explicitly tell when to use this versus alternative tools like igrid_decide_action, leaving some inference needed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
igrid_run_agentRun iGrid AI agentCDestructive
WRITE role: run an existing iGrid AI agent through POST /api/ai/run.
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare destructiveHint=true, so the agent knows this is a mutation tool. However, the description adds no context about what the mutation entails (e.g., side effects, irreversible actions, resource consumption). Given the annotation covers the destructive nature, but the description does not elaborate on specifics like state changes or concurrency limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short but not optimally structured. 'WRITE role' prefix is unclear and wastes space without adding value. The endpoint detail is helpful, but the single sentence tries to cover both purpose and endpoint. It could be more concise by removing 'WRITE role' and focusing on the agent execution context.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has a single, complex nested parameter with no schema definition, no output schema, and destructive annotations, the description is incomplete. It does not specify return values, error states, or how to structure the 'request' object. Sibling tools suggest a broader iGrid ecosystem, but no connection is made.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has one required parameter 'request' of type object with no schema definition (additionalProperties: true). Schema description coverage is 0%, so the description must compensate, but it only mentions the endpoint and does not explain the structure or expected content of the 'request' object. The nested object is completely undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('run') and resource ('existing iGrid AI agent') and includes the exact endpoint (POST /api/ai/run). It distinguishes from siblings like igrid_export_csv and igrid_ingest_csv by focusing on agent execution rather than data export or ingestion. However, 'WRITE role' is ambiguous and would benefit from elaboration.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool vs alternatives. The description lists sibling tools but does not differentiate use cases. It does not state whether the agent must be pre-configured, what prerequisites exist, or when to choose this over igrid_decide_action or igrid_propose_action.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
8 tool updates
v4.0.0- First observed
igrid_decide_action - First observed
igrid_export_csv - First observed
igrid_get_template - First observed
igrid_ingest_csv - First observed
igrid_list_domains - First observed
igrid_metrics - First observed
igrid_propose_action - First observed
igrid_run_agent
TDQS
Scored across 8 tools
Each tool targets a distinct operation: listing domains, exporting/ingesting CSV, getting templates, running agents, proposing/deciding actions, and metrics. There is no overlap or ambiguity between them.
All tools follow the consistent pattern 'igrid_<verb>_<object>' (e.g., igrid_export_csv, igrid_propose_action). The name 'igrid_metrics' uses a noun instead of verb but still fits the pattern as a read operation. Overall, naming is highly predictable.
With 8 tools, the server is well-scoped for its purpose: managing iGrid data domains and AI agent actions. The number is neither too small nor too large, each tool serves a clear function.
The tool surface covers key workflows: domain discovery, CSV import/export, template retrieval, agent execution, action governance, and metrics. Minor gaps exist, such as no tool for listing past proposed actions or viewing action history, but core functionality is complete.
Maintenance
Related MCP Connectors
Supervised API-write gateway for AI agents with policy, human approval and execution receipts.
Runtime permission, approval, and audit layer for AI agent tool execution.
- FullmaktOAuthai.fullmakt
Credential broker for AI agents: scoped, revocable API access with policy enforcement and audit.
Security gateway for AI agents: policy, approval, and audited execution, no secrets shared.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceProvides a trust and governance layer for AI agents, enabling secure API access, credential vaulting, paid execution with human approval, and automatic call resume.7 npm2-
- AlicenseAqualityAmaintenanceLocal zero-trust permission gateway for AI agents. Enforces policy-based tool authorization, human approvals, scoped permissions, and cryptographically verifiable audit logs.456 PyPI5Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to discover and execute tools via a secure MCP server with JWT authentication, RBAC, rate limiting, and audit logging.1MIT
- AlicenseNot gradedqualityBmaintenanceProvides a secure MCP gateway for AI agents to access APIs without exposing raw credentials, with scoped access, audit logging, and OAuth support.MIT