Skip to main content
Glama
merge.bxl1.08 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 do_merge( ctx: bxl.Context, bxl_actions: bxl.Actions, built_sourcedbs: dict[TargetLabel, Artifact], command_category: str) -> bxl.EnsuredArtifact: actions = bxl_actions.actions merger_input = actions.write_json("merge_input.json", built_sourcedbs) merger_output = actions.declare_output("merged_db.json") dependency_key = bxl_actions.exec_deps.keys()[0] command = cmd_args( bxl_actions.exec_deps[dependency_key][RunInfo], merger_input, "--output", merger_output.as_output(), # Declare that the merger result depends on all sourcedbs hidden = built_sourcedbs.values(), ) actions.run(command, category = command_category) return ctx.output.ensure(merger_output)

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