Skip to main content
Glama

functiongraph__UpdateFunctionCode

Updates a specified FunctionGraph function's code to deploy new inline, ZIP, OBS, JAR, or custom-image versions by function URN and project ID.

Instructions

[FUNCTIONGRAPH] 修改指定的函数的代码。

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": {
      "code_type": "<code_type>",
      "func_code": "<func_code>",
      "function_urn": "<function_urn>",
      "project_id": "<project_id>"
    },
    "name": "functiongraph__UpdateFunctionCode"
  }
}

Input Schema

NameRequiredDescriptionDefault
code_urlNo当CodeType为obs时,该值为函数代码包在OBS上的地址,CodeType为其他值时,该字段为空。
code_typeYes函数代码类型,取值有5种。
func_codeYesFuncCode结构返回体。
project_idYes租户项目 ID,获取方式请参见[获取项目ID](functiongraph_06_0260.xml)。
function_urnYes函数的URN,详细解释见FunctionGraph函数模型的描述。
code_filenameNo函数的文件名,当CodeType为jar/zip时必须提供该字段,inline和obs不需要提供。
depend_version_listNo依赖版本id列表
code_encrypt_kms_key_idNo用于用户代码加密的kms主秘钥ID。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden for a mutation operation, yet it says nothing about permissions/auth, whether running instances are affected, whether changes are reversible/versioned, size limits, or how code_type selection changes the semantics. It only restates the mutation that the tool name already implies.

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?

One short sentence with zero filler and the action front-loaded, so nothing is wasted. But at this length for an 8-parameter mutation tool, the terseness reflects under-specification rather than efficient communication.

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

Completeness2/5

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

With 8 parameters, a nested FuncCode object, an enum-driven dispatch (inline/zip/obs/jar/Custom-Image-Swr), no annotations and no output schema, a single sentence is clearly inadequate. Nothing tells the agent which parameter combination is valid for a given code_type or what the call returns.

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

Parameters3/5

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

Schema description coverage is 100% and the five code_type enum values are documented per-parameter, so the baseline of 3 applies. The description adds no meaning beyond the schema — it does not explain the interaction between code_type and code_url/func_code/code_filename, which is the main source of caller error.

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?

States a specific verb and resource — 'modify the code of the specified function' — which implicitly distinguishes it from config-updating siblings like UpdateFunctionConfig. However, it never names or contrasts any sibling explicitly, and 'modify code' remains a broad framing given five distinct code types (inline/zip/obs/jar/custom image).

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

Usage Guidelines2/5

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

No when-to-use guidance, no prerequisites (e.g. whether the function must be stopped or whether this creates a version), and no pointer to alternatives such as UpdateFunctionConfig or CreateFunctionVersion. The agent is left to infer that this is the code-deployment path purely from the name.

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

Deploy Server

Other Tools