Skip to main content
Glama
b1-mcp-server

b1-mcp-server

connect_database

Switch the active SAP Business One database and Service Layer connection to another environment profile by ID or database name, disconnecting stale sides and keeping healthy ones active.

Instructions

Switch the active database and Service Layer connection to a different SAP Business One environment. Searches connection profiles by ID or database name (case-insensitive). Partial matches are only accepted when they resolve to a single profile.

Each profile can include DirectDb (DB) credentials, Service Layer (SL) credentials, or both. When switching environments, each stale or non-matching side is disconnected before replacement; a healthy side that still matches the selected profile remains active. If only one side connects successfully, it remains active - retry the failed side after fixing credentials. Tracks failed login attempts per profile and warns about account lockout risk under the configured login policy.

Available profiles: (no profiles loaded)

Use "list" as the query to reload and list all available profiles.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "connect_database"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesThe database identifier to connect to. Can be the profile ID or database name. Use "list" to see all available profiles.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations to lean on, the description carries the full burden and does so well: it discloses that stale or non-matching sides are disconnected while a matching healthy side stays active, that partial connection success is possible, and that failed logins are tracked with lockout warnings. These are non-obvious operational consequences an agent could not infer from the schema.

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?

Content is front-loaded with the primary action, then consequences, then recovery, then the profile list. Every sentence carries operational information, though the bulleted 'Available profiles' block inflates length without adding definition-level guidance.

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

Completeness5/5

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

For a single-parameter connection-switch tool with no output schema, this covers what an agent needs: how the query resolves, what state changes on success, what happens on partial failure, and how to discover valid inputs. Nothing material is missing.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline would be 3, but the description adds real meaning: matching is case-insensitive, partial matches are accepted only when they resolve to a single profile, and the literal 'list' is a special sentinel that reloads profiles. That is well beyond the schema's own wording.

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?

States a specific verb and resource: switch the active database and Service Layer connection to a different SAP Business One environment. That is clearly distinct from siblings like check_connection or execute_service_layer, which merely use or probe an existing connection.

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?

Explains the lookup modes (profile ID or database name), the partial-match rule, and the recovery path when only one side connects ('retry the failed side after fixing credentials'). It also routes to the self-documenting 'list' query. It stops short of explicitly saying when to prefer this over check_connection.

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