Skip to main content
Glama

evaluate

Execute custom JavaScript functions inside WeChat mini-program's AppService context and receive their return values, with access to globals like getApp and getCurrentPages.

Instructions

注入函数源码在 AppService 中执行并返回结果(可访问 getApp/getCurrentPages 等全局)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNo执行时传入函数的参数
codeYes注入 AppService 执行的函数源码字符串,如 function() { return getApp().globalData.userInfo }
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the core behavior of injecting and executing code and returning results, and adds context about global access. However, it does not mention error handling, potential side effects, synchronous/asynchronous execution, or security implications, which are important for a code execution tool.

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

Conciseness5/5

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

The description is a single sentence that is front-loaded with the core action (inject and execute code) and includes relevant context (global access). There is no filler or redundancies.

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

Completeness3/5

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

This is a code execution tool with no output schema and no annotations. The schema covers parameters well, but the description does not cover important behavioral aspects such as return value format, error handling, or how the function's return value is serialized. For a powerful code injection tool, the context is under-specified.

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 coverage is 100% with descriptions for both 'args' and 'code'. The tool description adds a note about global access, but the schema's code example already demonstrates getApp().globalData.userInfo, so the description offers only marginal additional semantic value beyond what the schema provides.

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

Purpose5/5

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

The description clearly states the tool injects function source code into AppService, executes it, and returns the result. It also mentions access to globals like getApp/getCurrentPages, which distinguishes it from sibling tools like call_wx_method or page_call_method that target specific APIs.

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

Usage Guidelines3/5

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

The description implies the tool is for executing code with global access in the AppService context, but it does not explicitly state when to use this tool versus alternatives or provide any exclusion criteria. No guidance is given on when not to use it.

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

Install Server

Other Tools

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/pureia/wechat-devtools-mcp'

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