Skip to main content
Glama

Publish a Custom connector module

publish_module_version
Idempotent

Publish a Custom service's Python bundle, bind its version, declare schema and suggest Requests for review. Requires an existing Custom service datasource; catalogue cards are refused as datasource_is_a_card. For OAuth toolkit self, omit platform_datasource_id: this datasource supplies its own connection. Other platform_calls require a ready Composio card as platform_datasource_id and both connections to allow AI agent actions before approval. Otherwise, only a real publish requires a connected datasource (refused with datasource_not_ready), and the connection must allow the AI agent to build and try actions before approval (datasource_artifact_authority_not_granted). dry_run: true validates without writes even while the datasource is configuring or failed, without that connection permission. Republish preserves unchanged approvals; changed or removed operations lose approval. Results report carried and invalidated approvals and pending Requests. Request Service refusals retain code and request_id; platform_calls_invalid includes the rule and manifest path to fix. platform_origins_changed needs a changed bundle for new origins; manifest_not_replaced needs changed source, lockfile or runtime for a corrected manifest. Read describe_connector_programming for the manifest vocabulary, examples, timeout notices, write budgets, dry-run write semantics and publication result fields. Supply exactly one of source and base_artifact_hash. source is the whole file. base_artifact_hash is the current version with 1 to 100 edits of {old_string, new_string}; expected_sha256 is the source sha256 from read_module_version. Read that first. module_base_not_current, edit_stale, edit_not_found, edit_ambiguous, module_too_many_edits, module_edit_work_limit and module_not_published name the refusals. Through MCP a caller who is not a human Project Administrator is refused earlier, at the dispatch gate, with tool_not_enabled, because publish_module_version is not offered to them; the service's own administrator_role_required is a second check behind it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "datasource_id": "<datasource_id>"
    },
    "name": "publish_module_version"
  }
}

Input Schema

NameRequiredDescriptionDefault
editsNo1 to 100 replacements in the base source, in order: {old_string, new_string}. Each old_string must match once. Accepts an array or a JSON string.
moduleNoModule name to publish under. Default: the manifest's own module. With base_artifact_hash, an omitted manifest takes the base version's module and a sent manifest names its own module. An explicit module always wins
sourceNoThe whole Python source. Omit it when base_artifact_hash names the current version. At most 4194304 bytes
dry_runNoValidate the bundle and manifest without publishing or writing, even before the Custom service datasource is connected (default false)
runtimeNoInterpreter this bundle declares: use a dated runtime such as python3.12-2027.01, which stages the ekaya helper; a bare id such as python3.12 names the interpreter alone and stages no ekaya helper. Part of the artifact hash. With base_artifact_hash, omit it to keep the base version's runtime
lockfileNorequirements.lock for the bundle; part of the artifact hash; at most 1048576 bytes. With base_artifact_hash, omit it to keep the base version's lockfile
manifestNoThe contract this bundle declares: module, runtime, and one entry per operation with its name, entity (namespace.entity) and its result — output columns for rows, or result: "document" with an envelope and projections. Required with source. Omitted with a base, the current version's manifest is kept; send one whole to replace it. At most 1048576 bytes, and one operation's envelope at most 262144
datasource_idYesThe service datasource this artifact runs for (UUID)
expected_sha256NoOptional sha256 of the base source from read_module_version. Refused when the source has changed.
base_artifact_hashNo64 lowercase hex of the current published version. Read it with read_module_version. Send this or source, not both.
platform_datasource_idNoOmit for OAuth toolkit self, which uses this datasource's own connection. Required for other platform_calls: a ready Composio-card datasource in this project for the declared toolkit. Its connection supplies publication metadata and toolkit execution. The Custom datasource's declared credentials supply the module's environment through its separate environment connection. See describe_connector_programming for toolkit scope. A real publish requires both datasources to allow AI agent actions before approval. The card itself is never published onto.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Far beyond the annotations, the description discloses the authorization model (non-Project-Administrator refused earlier at the dispatch gate with tool_not_enabled), the approval consequences of republishing (unchanged approvals preserved, changed or removed operations lose approval), and dry-run no-write semantics. It also enumerates refusal codes with their meanings and where to find more detail via describe_connector_programming. This is unusually complete behavioral disclosure for a mutating tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first sentence is well front-loaded, but the remainder is a dense, unstructured block that mixes refused-error codes, permission flow, edit semantics and pointers to other tools in one run-on paragraph. Every clause carries information, yet the lack of grouping or bullets makes it hard to scan for the rule governing a specific parameter.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter mutation tool with no output schema, the description covers preconditions, mutual exclusivity of source versus base_artifact_hash, approval effects, and what results report (carried and invalidated approvals, pending Requests). It defers detailed result field definitions to describe_connector_programming, which is a reasonable division of labor but leaves the return shape one hop away.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3; the description adds cross-field constraints the schema cannot express, notably 'supply exactly one of source and base_artifact_hash' and the procedural rule that expected_sha256 comes from a prior read_module_version call. It also clarifies that base_artifact_hash with omitted runtime/lockfile/manifest inherits the base version's values. Marginal but real value above the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb and resource: 'Publish a Custom service's Python bundle, bind its version, declare schema and suggest Requests for review.' It clearly conveys the scope of the operation. It does not, however, differentiate itself from siblings such as publish_app_version or republish_connector, so an agent must infer which publish tool applies to a given case.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Strong precondition guidance: an existing Custom service datasource is required, OAuth toolkit self must omit platform_datasource_id, other platform_calls require a ready Composio card, and dry_run validates without writes even on an unconnected datasource. It also mandates reading read_module_version first and supplying exactly one of source and base_artifact_hash. It stops short of naming an alternative tool for cases this one does not handle.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources