Skip to main content
Glama

createValue

Generate and define new values within the Whistle MCP Server to streamline proxy management, enabling efficient rule and group configuration.

Instructions

创建新的值

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes值名称

Implementation Reference

  • src/index.ts:209-219 (registration)
    Registration of the MCP tool 'createValue' using server.addTool.
    server.addTool({
      name: "createValue",
      description: "创建新的值",
      parameters: z.object({
        name: z.string().describe("值名称"),
      }),
      execute: async (args) => {
        const result = await whistleClient.createValue(args.name);
        return formatResponse(result);
      },
    });
  • Input schema for 'createValue' tool: requires a 'name' string parameter.
    parameters: z.object({
      name: z.string().describe("值名称"),
    }),
  • Handler function for 'createValue' tool that delegates to WhistleClient.createValue and formats the response.
    execute: async (args) => {
      const result = await whistleClient.createValue(args.name);
      return formatResponse(result);
    },
  • Core implementation of createValue in WhistleClient: sends POST request to Whistle's /cgi-bin/values/add endpoint to create a new value.
    async createValue(name: string): Promise<any> {
      const formData = new URLSearchParams();
      formData.append("clientId", `${Date.now()}-1`);
      formData.append("name", name);
    
      const response = await axios.post(
        `${this.baseUrl}/cgi-bin/values/add`,
        formData,
        {
          headers: {
            "Content-Type": "application/x-www-form-urlencoded",
          },
        }
      );
      return response.data;
    }
Behavior1/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 of behavioral disclosure. The description only states '创建新的值' (Create new value), which implies a write/mutation operation but reveals nothing about permissions required, side effects, error conditions, rate limits, or what happens upon success. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 extremely concise with just three Chinese characters ('创建新的值'), which translates to 'Create new value'. It is front-loaded with the core action and contains no unnecessary words or sentences. Every element earns its place, making it maximally efficient in terms of length.

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?

Given that this is a mutation tool (creating a value) with no annotations and no output schema, the description is incomplete. It fails to explain what the tool returns, what happens on success or error, or how it interacts with the system context (e.g., values in groups, rules). The description does not compensate for the lack of structured data, leaving significant gaps for an AI agent to understand the tool's behavior.

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?

The input schema has 100% description coverage (the 'name' parameter is documented as '值名称' or 'value name'), so the schema already provides the necessary parameter information. The description adds no additional meaning about parameters beyond what the schema provides, which meets the baseline of 3 when schema coverage is high.

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?

The description '创建新的值' (Create new value) is a tautology that essentially restates the tool name 'createValue' in Chinese. While it indicates a creation action, it doesn't specify what type of value is being created, what resource it operates on, or how it differs from sibling tools like 'createGroup' or 'createValuesGroup'. The purpose is vague and lacks differentiation from similar tools.

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

Usage Guidelines1/5

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

The description provides no guidance on when to use this tool versus alternatives. There are multiple sibling tools that involve values (e.g., 'addValueToGroup', 'deleteValue', 'renameValue', 'updateValue', 'getAllValues'), but the description offers no context about when 'createValue' is appropriate versus these other tools, nor any prerequisites or exclusions for its use.

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

Related 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/7gugu/whistle-mcp'

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