Skip to main content
Glama

SAP Commerce MCP Server

basesites.py1.2 kB
"""Tools related to OCC base site discovery.""" from __future__ import annotations from typing import Annotated from fastmcp import Context, FastMCP from pydantic import Field from app.models import JsonObject from app.occ_client import occ_client from app.utils import OccApiError from .common import handle_occ_error def register(server: FastMCP) -> None: """Register base site tools with the FastMCP server.""" @server.tool("basesites.list", description="List OCC base sites using the configured base URL.") async def basesites_list( ctx: Context, fields: Annotated[ str | None, Field( description="Override the fields query parameter (defaults to OCC_DEFAULT_FIELDS).", examples=["DEFAULT"], ), ] = None, ) -> JsonObject: await ctx.report_progress(0, total=1, message="Fetching base sites") try: payload = await occ_client.get_basesites(fields) except OccApiError as error: await handle_occ_error(ctx, "basesites.list", error) await ctx.report_progress(1, total=1, message="Retrieved base sites") return payload

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/commerce-cloud-integrations/sap-commerce-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server