Skip to main content
Glama
jameswh3

OGE HSE MCP

by jameswh3

OGE HSE MCP demonstration

This repository provisions an Entra-protected, read-only remote MCP server containing fictitious HSE procedures and incidents. It is a demonstration only; none of the records are operational safety guidance.

Local validation

  1. Copy .env.example to .env and set the variables.

  2. Install with py -m pip install -e ".[dev]".

  3. Run oge-hse-seed.

  4. Run tests with py -m pytest -q.

Related MCP server: SSO MCP Server

Azure provisioning

The script reads deployment-specific values only from .env:

.\scripts\provision.ps1

It creates the resource API registration when needed, provisions Azure Container Apps and Azure Container Registry, builds the image in ACR, and prints the MCP URL and resource API scope. It does not grant tenant-wide consent or create Microsoft 365 integrations; those are explicit administrator review steps described in docs/microsoft-365-integration.md.

Remove all demonstration Azure resources and the Entra app registration with .\scripts\remove.ps1.

MCP tools

  • search_hse_knowledge: Search procedures and incident lessons with grounding metadata.

  • search_procedures: Search global and site-authorized HSE procedures.

  • get_procedure: Retrieve one authorized procedure.

  • search_incidents: Search fictitious incidents for authorized sites.

Authorization is fail-closed. The HTTP bearer token is validated for signature, issuer, audience, expiry, and required delegated scope. Site access comes from the configured claim named by HSE_ENTRA_SITE_CLAIM; a tool argument can't expand that scope.

Microsoft 365 integration paths

Available Tools

4 tools
get_procedureB

Get one HSE procedure when it is global or in the caller's authorized site scope.

ParametersJSON Schema
NameRequiredDescriptionDefault
site_idsNo
procedure_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does disclose the scope restriction, which is a behavioral constraint. However, it doesn't explain what happens if the procedure is not found, whether it's read-only (implied by 'get'), or any error handling. For a simple get operation, this is somewhat sufficient but still leaves gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no redundancy. It front-loads the action and resource, and adds the scope condition in a compact clause. Every word earns its place, making it optimally concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with two parameters and no annotations, the description is insufficient. It doesn't explain the site_ids parameter, doesn't provide usage guidance relative to siblings, and doesn't mention output or error conditions. The output schema may cover return values, but the description still leaves critical gaps for an agent to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

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 mentions scope authorization but doesn't explain the site_ids parameter at all. The procedure_id is self-explanatory from its name, but site_ids remains ambiguous. The description adds minimal value over the schema and fails to clarify the optional parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (Get) and the resource (one HSE procedure), and adds a scoping condition (global or authorized site scope). It distinguishes from siblings implicitly by specifying a single procedure fetch, but doesn't explicitly name alternatives. This is clear and specific enough to understand the tool's core purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to choose this tool over the sibling search tools. It only states a precondition (global or authorized site scope) which clarifies when the tool can be used, not when it should be used. There is no mention of alternatives or exclusions, leaving the agent to infer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_hse_knowledgeA

Search current HSE procedures and incident lessons for grounded answers.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
site_idsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral disclosure burden. It usefully discloses that the tool searches current knowledge and returns grounded answers, which signals a synthesis/retrieval behavior. It does not mention limitations, citation behavior, or permissions, so it is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence that states verb, resource, and purpose with no filler. Every word contributes to the agent's understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The core call is simple (one required query), and an output schema exists to document return values. The main gaps are undocumented parameter semantics for limit and site_ids and the lack of explicit routing guidance relative to sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

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, but it only reinforces the query field through 'Search'. Limit and site_ids are not explained, leaving the agent to guess what values are acceptable and how they affect results.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific action ('Search'), a clear resource ('current HSE procedures and incident lessons'), and the intended result ('grounded answers'). This differentiates it from the sibling tools search_procedures and search_incidents, which target narrower sources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'for grounded answers' implies the tool is meant for question-answering over HSE knowledge, giving some usage context. However, it does not explicitly say when to prefer this over search_procedures or search_incidents, nor when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_incidentsA

Search fictitious HSE incidents in the caller's authorized site scope.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryNo
severityNo
site_idsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description must disclose behavioral traits on its own. It indicates a read-only search operation via 'Search' and notes the 'fictitious' nature of the data, but it doesn't elaborate on side effects, pagination, or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that gets to the point immediately. No wasted words, and the core purpose is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having an output schema, the description is too sparse for a tool with four parameters. It doesn't explain what 'query' refers to, what severity values are accepted, or how site_ids should be provided. It also doesn't differentiate from sibling search tools beyond the resource type.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, and the description provides no explanation of any of the four parameters (limit, query, severity, site_ids). The agent must infer parameter semantics entirely from the schema, which only gives types and defaults, leaving meaning ambiguous.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Search' and the resource 'fictitious HSE incidents', making it distinct from sibling tools that search knowledge and procedures. The mention of 'authorized site scope' adds a specific context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides context that the search is limited to the caller's authorized sites, which informs when this tool is appropriate. However, it does not explicitly mention alternatives or when not to use it, so it's clear but lacks exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_proceduresC

Search current HSE procedures in the caller's authorized site scope.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryNo
categoryNo
site_idsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the full burden of behavioral disclosure. It mentions 'current' (implying active/valid status) and 'authorized site scope' (implying access control), but it does not state that the operation is read-only, describe pagination, sorting, or what happens when no results are found. This is minimal for a search tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, tightly worded sentence that front-loads the action and scope. It contains no filler or redundancy. However, it is so brief that it sacrifices necessary detail, but that is a completeness issue, not a conciseness one.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having an output schema (which helps with return format), the description lacks essential context: it doesn't explain the optional parameters, filtering semantics, or usage scenarios. For a search tool with 4 optional params and no annotations, this is insufficient for an agent to call it correctly and effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description provides no information about any of the four parameters (limit, query, category, site_ids). Since the schema only gives types and defaults, the description must compensate but fails to do so, leaving the agent without guidance on how to construct effective queries.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Search', the resource 'HSE procedures', and the scope constraint 'in the caller's authorized site scope'. It distinguishes itself from siblings like search_hse_knowledge (knowledge base) and search_incidents (incidents) by resource type, and from get_procedure (likely single retrieval) by the search action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance is given on when to use this tool versus its alternatives. While the search vs. get distinction is implied by the name, the description does not mention get_procedure for specific retrievals or search_hse_knowledge for knowledge queries. The 'authorized site scope' hints at a constraint but doesn't route the agent.

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.

  1. 4 tool updatesv0.1.0
    • First observedget_procedure
    • First observedsearch_hse_knowledge
    • First observedsearch_incidents
    • First observedsearch_procedures

TDQS

B3.4/5.0

Scored across 4 tools

Disambiguation3/5

search_procedures and search_incidents are clearly scoped, but search_hse_knowledge overlaps with both by searching procedures and incident lessons. An agent may be uncertain whether to use the broad knowledge search or the specific procedure/incident search for a given query.

Naming Consistency5/5

Tool names consistently follow a verb_noun pattern using snake_case: search_hse_knowledge, search_procedures, search_incidents, and get_procedure. The one get_* tool is a natural singular retrieval counterpart to the search_* tools.

Tool Count5/5

Four tools is a well-scoped set for an HSE knowledge and incident search server. Each tool serves a distinct retrieval need without unnecessary bulk.

Completeness4/5

The read-only search and retrieval workflow is well covered: procedures can be searched and retrieved, incidents can be searched, and a combined knowledge search exists. A dedicated get_incident or incident-lesson detail tool is missing, but agents can likely work around it via search_hse_knowledge.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Provides secure access to Microsoft Entra ID (Azure AD) resources including users, devices, and applications through Microsoft Graph API. Enables querying organizational data with comprehensive audit logging to Azure Blob Storage.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables enterprise-managed authorization for MCP on Azure App Service, with deployable Entra OAuth and a local EMA ID-JAG lab exposing whoami and authorization_model tools.
    1
    MIT