Skip to main content
Glama

functiongraph__ImportFunction

Imports a function into Huawei Cloud FunctionGraph from a base64-encoded code file, using the specified function name, file metadata, 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": {
      "file_code": "<file_code>",
      "file_name": "<file_name>",
      "file_type": "<file_type>",
      "func_name": "<func_name>",
      "project_id": "<project_id>"
    },
    "name": "functiongraph__ImportFunction"
  }
}

Input Schema

NameRequiredDescriptionDefault
packageNo应用名称,默认为default
file_codeYes函数代码。代码必须要进行base64编码
file_nameYes文件名
file_typeYes文件类型
func_nameYes函数名
project_idYes租户项目 ID,获取方式请参见[获取项目ID](functiongraph_06_0260.xml)。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

D1.9/5.0
Behavior1/5

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

No annotations are provided, so the description bears the full disclosure burden, and it discloses nothing: not that this is a mutating write, not whether an existing function is overwritten, not permission or quota requirements, not the base64 constraint that governs success. The single phrase adds zero behavioral context beyond the tool name.

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

Conciseness2/5

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

It is short and front-loaded, but that brevity reflects under-specification rather than efficiency. For a six-parameter write tool the entire body is a redundant Chinese echo of the English name plus a vendor tag, so nothing earns its place because nothing useful is present.

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

Completeness1/5

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

This is a mutating import operation with five required parameters, no annotations, and no output schema. The description says nothing about the effect of the call, what happens on name collision, or what is returned, so an agent would be invoking it blind on every dimension that the schema does not cover.

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 every one of the six parameters carries a description and example, including the base64 encoding requirement for file_code and the ID lookup link for project_id. The description adds nothing on top, but the schema already does the work, so the baseline applies.

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

Purpose2/5

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

"导入函数" restates the tool name in Chinese and adds only a bracketed product tag. It does not distinguish this from siblings like CreateFunction, UpdateFunctionCode, or ExportFunction, nor does it say what an "import" produces (a new function? an overwrite?). An agent can infer only a generic verb+resource pairing.

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?

There is no when-to-use guidance, no mention of prerequisites, and no routing to alternatives such as CreateFunction. The agent must guess whether importing should be preferred over creating with inline code, or whether the target function must already exist.

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