igrid-sce-mcp-tool
igrid-sce-mcp-tool v4 — Read / Write / Admin
Capa de integración MCP en Node.js/JavaScript para las API REST existentes de iGrid-Prometheus. El backend de iGrid y la división existente de ocho herramientas no cambian; esta versión añade autorización basada en roles de SAP BTP XSUAA a nivel de herramienta MCP.
Modelo de autorización
El proyecto ahora define tres ámbitos de XSUAA, tres plantillas de roles y tres colecciones de roles predefinidas:
Colección de roles | Plantilla de roles | Ámbitos | Operaciones MCP permitidas |
|
|
| Solo herramientas GET/lectura |
|
|
| Solo herramientas POST/escritura |
|
|
| Las ocho herramientas |
La autorización se verifica dentro del toolHandler común de MCP antes de cualquier solicitud a la API de iGrid descendente. Un usuario sin el ámbito requerido recibe un error de herramienta MCP Forbidden:.
Related MCP server: agent-sudo-mcp
Exactamente 8 herramientas MCP
Grupo Bearer — src/tools/bearer-tools.js
igrid_list_domains→GET /api/hub/datasets→ Read/Adminigrid_get_template→GET /api/hub/template/:domain→ Read/Adminigrid_run_agent→POST /api/ai/run→ Write/Adminigrid_propose_action→POST /api/ai/action/propose→ Write/Adminigrid_decide_action→POST /api/ai/action/decide→ Write/Adminigrid_metrics→GET /api/ai/metrics→ Read/Admin
Grupo x-api-key — src/tools/api-key-tools.js
igrid_ingest_csv→POST /api/ingest/:domain→ Write/Adminigrid_export_csv→GET /api/export/:domain→ Read/Admin
igrid_propose_action está clasificada intencionalmente como Write porque la regla de autorización solicitada se basa en la operación HTTP real y esta herramienta utiliza POST.
No se expone ninguna herramienta MCP igrid_health. /healthz sigue siendo solo el endpoint de salud de la aplicación.
El comportamiento existente de iGrid descendente no cambia
Seis herramientas continúan usando la sesión Bearer/servicio de iGrid.
igrid_ingest_csvyigrid_export_csvcontinúan usando el canalx-api-keyde iGrid.No se introduce ningún servicio Destination o Connectivity.
No se codifican credenciales ni secretos.
Archivos importantes
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 mappingEntorno
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=Para las herramientas Bearer, se prefiere un IGRID_BEARER_TOKEN emitido previamente. Si no está presente, el gestor de tokens existente puede usar el contrato de inicio de sesión/MFA de iGrid aprobado cuando se proporcione la configuración MFA requerida.
Compilación
npm install
npm run check
npm run security:check
npm test
npx mbt build -t mta_archivesDespliegue en BTP
cf login
cf target -o <ORG> -s <SPACE>
cf deploy mta_archives/igrid-sce-mcp-tool_4.0.0.mtar -fEstablecer los secretos de iGrid después del despliegue:
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-toolO, al usar el flujo de inicio de sesión/MFA de servicio aprobado:
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-toolAsignación de roles XSUAA
El despliegue crea/actualiza la instancia de servicio XSUAA igrid-sce-mcp-tool-xsuaa a partir de xs-security.json.
Después del despliegue, en la subcuenta de SAP BTP:
Abra Seguridad → Colecciones de roles.
Confirme que existen las colecciones predefinidas
iGrid-MCP-Read,iGrid-MCP-WriteyiGrid-MCP-Admin.Asigne
iGrid-MCP-Reada usuarios de solo lectura.Asigne
iGrid-MCP-Writea usuarios de solo escritura.Asigne
iGrid-MCP-Adminsolo a usuarios que necesiten tanto herramientas MCP GET como POST.Vuelva a autenticar el cliente MCP para que su nuevo token contenga los ámbitos asignados.
Si el usuario solo tiene Read, las herramientas POST fallan en la capa MCP. Si el usuario solo tiene Write, las herramientas GET fallan. Admin puede invocar las ocho herramientas.
OAuth / MCP remoto de Claude
Use el endpoint desplegado:
https://<BTP_ROUTE>/mcpLos metadatos de descubrimiento OAuth ahora anuncian los ámbitos XSUAA read, write y admin. Para la aplicación de roles específicos de usuario, use un flujo OAuth que produzca un token de usuario, normalmente código de autorización, para que las colecciones de roles BTP del usuario estén representadas en el token.
Una clave de servicio aún puede proporcionar credenciales de cliente OAuth XSUAA, pero un token client_credentials es una identidad de cliente técnico y no debe tratarse como si hubiera heredado la colección de roles de un usuario humano.
stdio local
El stdio local no tiene un JWT de usuario de BTP, por lo que el comportamiento de roles se simula con MCP_LOCAL_ROLE. El valor predeterminado es Admin para preservar el comportamiento local anterior.
Prueba local de solo lectura:
MCP_LOCAL_ROLE=Read npm run start:stdioPrueba local de solo escritura:
MCP_LOCAL_ROLE=Write npm run start:stdioPrueba local completa:
MCP_LOCAL_ROLE=Admin npm run start:stdioEjemplo de Claude 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>"
}
}
}
}Prueba de aceptación de roles
Use tres usuarios (o tres asignaciones de usuario-rol) y obtenga un token nuevo después de cada asignación.
Usuario Read
Éxito esperado:
igrid_list_domains
igrid_get_template
igrid_metrics
igrid_export_csvSe espera Forbidden::
igrid_run_agent
igrid_propose_action
igrid_decide_action
igrid_ingest_csvUsuario Write
Éxito esperado:
igrid_run_agent
igrid_propose_action
igrid_decide_action
igrid_ingest_csvSe espera Forbidden::
igrid_list_domains
igrid_get_template
igrid_metrics
igrid_export_csvUsuario Admin
Las ocho herramientas deberían pasar la verificación de roles MCP. La autenticación/autorización de iGrid descendente y la validación de solicitudes aún se aplican.
Notas de seguridad
La verificación de permisos ocurre antes de la invocación de la API de iGrid.
XSUAA controla los permisos MCP entrantes; iGrid sigue siendo la autoridad para las credenciales descendentes y la autorización empresarial.
Nunca coloque la clave API de iGrid, la contraseña de iGrid, el token Bearer, el secreto de cliente XSUAA o la clave de servicio en el control de código fuente.
Consulte
README-SECURITY.mdpara conocer el modelo de seguridad conciso.
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