Skip to main content
Glama
util.bzl1.13 kB
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under both the MIT license found in the # LICENSE-MIT file in the root directory of this source tree and the Apache # License, Version 2.0 found in the LICENSE-APACHE file in the root directory # of this source tree. def _configuration_info_union(infos): if len(infos) == 0: return ConfigurationInfo( constraints = {}, values = {}, ) if len(infos) == 1: return infos[0] constraints = {k: v for info in infos for (k, v) in info.constraints.items()} values = {k: v for info in infos for (k, v) in info.values.items()} return ConfigurationInfo( constraints = constraints, values = values, ) def _constraint_values_to_configuration(values): return ConfigurationInfo(constraints = { info[ConstraintValueInfo].setting.label: info[ConstraintValueInfo] for info in values }, values = {}) util = struct( configuration_info_union = _configuration_info_union, constraint_values_to_configuration = _constraint_values_to_configuration, )

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/systeminit/si'

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