Skip to main content
Glama
b1-mcp-server

b1-mcp-server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_DRY_RUNNoThe exact value true validates raw SQL and Service Layer writes without executing them; connections and Service Layer GET still run.false
MCP_LOG_LEVELNoStderr verbosity: debug / info / warn / error. JSONL file logging is unaffected.info
MCP_SL_TIMEOUT_MSNoService Layer login/request timeout in milliseconds. Must be a positive integer.30000
MCP_SL_TRUST_FILENoLocal non-secret certificate trust store.~/.claude/service-layer-trust.json
MCP_AUDIT_LOG_PATHNoAudit log JSONL file. Unset or empty uses the default path.~/.claude/logs/b1-mcp-audit.jsonl
MCP_MAX_RESULT_ROWSNoMax rows returned to the model; extra rows are cut and announced. Must be a positive integer.500
NODE_EXTRA_CA_CERTSNoPath to a CA bundle for an internal certificate authority; set before starting the MCP process.
MCP_CONNECTIONS_FILENoPath to the connection-profile file.~/.claude/connections.json
MCP_MAX_QUERY_LENGTHNoMax SQL length in characters. Must be a positive integer.8000
MCP_MAX_RESULT_CHARSNoMax characters of result JSON, applied after the row cap. Must be a positive integer.100000
MCP_QUERY_TIMEOUT_MSNoStatement ceiling; a query still running at this point is aborted. Must be a positive integer.60000
MCP_SL_MAX_BODY_CHARSNoMaximum serialised PATCH/POST body length. Must be a positive integer.50000
MCP_SL_MAX_URL_LENGTHNoMaximum relative OData URL length. Must be a positive integer.2048
MCP_SL_WRITES_ENABLEDNoEmergency kill switch for every Service Layer write (PATCH, POST, DELETE); true/false are case-insensitive and invalid values disable writes.true
MCP_RATE_LIMIT_MAX_CALLSNoMax calls per tool per rate-limit window. Must be a positive integer.60
MCP_RATE_LIMIT_WINDOW_MSNoRate-limit window in milliseconds. Must be a positive integer.60000
MCP_ELICITATION_TIMEOUT_MSNoHow long a human gets to answer an approval form (certificate trust, Service Layer write) before it fails closed. Must be a positive integer.120000

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
connect_databaseA

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.

execute_sqlA

Execute a raw SQL statement against the currently connected database. All SQL, whether written by the user or generated by you, goes through the same server-side validation.

IMPORTANT: Before calling this tool, you MUST confirm which database the user intends to query. If the user has not explicitly stated the target database in their message, ASK them first. Do NOT assume the currently connected database is the intended target.

READ-ONLY: only SELECT (and read-only DO BEGIN...END blocks) execute. Data-changing statements are blocked server-side.

If the user needs a write (INSERT/UPDATE/DELETE), do NOT call this tool — generate the SQL and give it to the user to run in a real DB client (HANA Studio / DBeaver / hdbsql), where a human can review the statement and control its transaction handling.

Rules enforced server-side:

  • READ-ONLY: INSERT/UPDATE/DELETE/DROP are blocked for everyone — no confirmation bypass.

  • Direct EXEC/EXECUTE/CALL: blocked (stored procedures are disabled).

  • CREATE/ALTER: blocked.

  • MS SQL pass-through (OPENQUERY/OPENROWSET/OPENDATASOURCE): blocked.

get_schema_infoA

Retrieve metadata about tables, columns, or procedures in the currently connected database. Read-only. Use this to explore the schema before writing queries. For "columns": provide the table name in "filter". For "tables"/"procedures": filter is optional (LIKE pattern).

IMPORTANT: Before calling this tool, you MUST confirm which database the user intends to query. If the user has not explicitly stated the target database in their message, ASK them first. Do NOT assume the currently connected database is the intended target.

execute_service_layerA

Execute a read-only OData GET against the currently connected SAP Business One Service Layer. Writes go through execute_service_layer_write.

Denied when the connected profile's slAllowedMethods (printed by connect_database) omits GET. Query options are allowed; absolute URLs, Login/Logout and $batch are denied.

execute_service_layer_writeA

Execute a guarded OData write (PATCH, POST or DELETE) against the currently connected SAP Business One Service Layer. These are real writes to the company database.

The verb must be in the connected profile's slAllowedMethods, and database must equal the connected Service Layer database exactly — connect_database prints both. A mismatch is denied.

Approval follows the profile's slWriteApproval, also printed by connect_database. "elicitation" (default): the server asks the user through an MCP approval form; clients without form elicitation cannot write. "client" or "none": the server executes after this client's own permission prompt, honoured only for Claude Code. On a "none" profile, prefer execute_service_layer_write_unattended, which does the same write without any approval; use this tool there only when the user asks to confirm the write. MCP_DRY_RUN previews but never executes a write, and MCP_SL_WRITES_ENABLED=false disables every write globally.

PATCH and DELETE accept one directly keyed entity endpoint only. POST accepts an entity set, a service operation, or one action on a keyed entity (Orders(12)/Close). Query options, navigation paths, absolute URLs, Login/Logout and $batch are denied.

execute_service_layer_write_unattendedA

Execute a guarded OData write (PATCH, POST or DELETE) with NO approval of any kind, for development companies. Denied unless the connected profile has slWriteApproval "none" (printed by connect_database); otherwise use execute_service_layer_write. These are real writes to the company database.

Every other rule of execute_service_layer_write applies unchanged: database must equal the connected Service Layer database, the verb must be in slAllowedMethods, the same endpoint shapes are enforced, MCP_DRY_RUN previews and MCP_SL_WRITES_ENABLED=false disables it.

check_connectionA

Check if the database and Service Layer connections are active and alive. Pings DirectDb (SELECT query) and Service Layer (GET request) independently. No parameters required. Reports status for both connections.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 7 tools

Disambiguation4/5

Most tools target clearly distinct operations: connection switching, health check, schema introspection, raw SQL, and OData reads/writes. The only real overlap is execute_service_layer_write vs execute_service_layer_write_unattended, which differ solely in approval mode, but the descriptions explicitly state when to use each, mitigating confusion.

Naming Consistency5/5

All tools use snake_case with a predictable verb_noun (or verb_resource) structure: connect_database, execute_sql, check_connection, get_schema_info, execute_service_layer, and the consistent _write / _write_unattended suffixes. No mixed conventions.

Tool Count5/5

Seven tools is well-scoped for a database + Service Layer bridge: connection, health, schema, SQL read, SL read, SL write, and unattended write. Each tool earns its place; nothing feels redundant beyond the necessary approval-mode split.

Completeness4/5

The surface covers the full read lifecycle (connect, check, schema, SQL, OData GET) plus guarded writes, with the deliberate and documented omission of raw SQL writes. The main gap is the lack of Service Layer metadata/entity-set discovery analogous to get_schema_info, which would help agents construct valid OData requests.