Skip to main content
Glama

organization_info

Access organization details in SingleStore, including unique orgID and display name, for effective user context and system integration.

Instructions

Retrieve information about the current user's organization in SingleStore. Returns organization details including: - orgID: Unique identifier for the organization - name: Organization display name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ctxNo

Implementation Reference

  • The primary handler function implementing the organization_info tool. It fetches the current organization details using a utility function, tracks analytics, and returns formatted organization information including orgID and name.
    def organization_info() -> dict: """ Retrieve information about the current user's organization in SingleStore. Returns organization details including: - orgID: Unique identifier for the organization - name: Organization display name """ start_time = time.time() settings = config.get_settings() user_id = config.get_user_id() settings.analytics_manager.track_event( user_id, "tool_calling", {"name": "organization_info"} ) org = utils.fetch_organization() execution_time = (time.time() - start_time) * 1000 return { "status": "success", "message": f"Retrieved organization information for '{org.name}'", "data": { "orgID": org.id, "name": org.name, }, "metadata": { "execution_time_ms": round(execution_time, 2), "timestamp": datetime.now(timezone.utc).isoformat(), }, }
  • Central registration of the organization_info tool (and others) in the tools_definition list, which is used to create Tool instances for the MCP server.
    tools_definition = [ {"func": get_user_info}, {"func": organization_info}, {"func": choose_organization}, {"func": set_organization}, {"func": workspace_groups_info}, {"func": workspaces_info}, {"func": resume_workspace}, {"func": list_starter_workspaces}, {"func": create_starter_workspace}, {"func": terminate_starter_workspace}, {"func": list_regions}, {"func": list_sharedtier_regions}, {"func": run_sql}, {"func": create_notebook_file}, {"func": upload_notebook_file}, {"func": create_job_from_notebook}, {"func": get_job}, {"func": delete_job}, ] # Export the tools tools = [Tool.create_from_dict(tool) for tool in tools_definition]
  • Supporting utility function called by the organization_info handler to fetch the current organization object via SingleStore's workspace manager.
    def fetch_organization(): """ Returns the organization object using the workspace manager. """ settings = config.get_settings() workspace_manager = s2.manage_workspaces( access_token=get_access_token(), base_url=settings.s2_api_base_url, organization_id=get_org_id(), ) return workspace_manager.organization

Latest Blog Posts

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/singlestore-labs/mcp-server-singlestore'

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