Skip to main content
Glama
Strom-Capital

mcp-server-db2i

Get Business Context

get_business_context
Read-onlyIdempotent

Retrieve business context for DB2 for i tables and entities, including row filters, column descriptions, and undeclared relations. Filter by entity or table to understand query logic and schema meaning.

Instructions

List business entities, row filters most queries need (such as leaving out deleted rows), table and column descriptions, and relations that the catalog does not declare as foreign keys. Filter by entity or table. Omit both to return every annotation loaded from MCP_CUSTOM_TOOLS. An unknown entity name falls back to names that partly match it, and when nothing matches, the result lists the loaded entity names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNoTable name, or SCHEMA.TABLE
entityNoEntity name, for example sales_order

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
hintNoWhat to call next when the filters did not match exactly
countNo
errorNo
successYes
partial_matchNoTrue when no entity had the requested name and data holds entities whose names partly match it
available_tablesNoEvery annotated SCHEMA.TABLE, when the table filter matched nothing
available_entitiesNoEvery loaded entity name, when nothing matched the filters

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv3.5.0
    • addedOutput schema / properties / available_entities
      Added value: +{
      +  "description": "Every loaded entity name, when nothing matched the filters",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / available_tables
      Added value: +{
      +  "description": "Every annotated SCHEMA.TABLE, when the table filter matched nothing",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / data / items / properties / filters
      Added value: +{
      +  "description": "Row filters most queries on this table need, such as leaving out deleted rows",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "columns": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "reason": {
      +        "type": "string"
      +      },
      +      "sql": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "sql",
      +      "columns"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / hint
      Added value: +{
      +  "description": "What to call next when the filters did not match exactly",
      +  "type": "string"
      +}
    • addedOutput schema / properties / partial_match
      Added value: +{
      +  "description": "True when no entity had the requested name and data holds entities whose names partly match it",
      +  "type": "boolean"
      +}
  2. First observedv3.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive). The description adds genuinely useful behavior beyond them: the MCP_CUSTOM_TOOLS data source, fuzzy fallback on unknown entity names, and the empty-result fallback that lists loaded entity names. It does not cover output shape, but an output schema exists.

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?

Front-loaded with what is returned, then filtering, then edge-case behavior. It is information-dense and every sentence carries weight, though the first sentence is a long run-on list that could be tightened slightly.

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

Completeness4/5

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

With an output schema present, return values need not be described, and the description covers source, filtering, and fallback behavior adequately for a 2-param read-only lookup. Only the explicit sibling-routing guidance is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description earns extra credit by explaining the interaction between the two params: filter by either entity or table, omit both to return everything, and unknown entity names trigger partial matching rather than failure.

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?

States a specific verb (List) and enumerates the resource types returned: business entities, row filters, table/column descriptions, and non-FK relations. The phrase 'relations that the catalog does not declare as foreign keys' implicitly distinguishes it from get_table_constraints, though it does not name that sibling outright.

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?

Usage is implied rather than stated — 'row filters most queries need' hints it belongs in query-construction workflows, and the filter/omit semantics are explained. But it never says when to prefer this over describe_table, get_table_constraints, or get_related_objects, so the agent must infer the boundary.

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