Skip to main content
Glama
Text2Go

AI Humanizer MCP Server

by Text2Go

detect

Identify AI-generated text using advanced detection methods like COPYLEAKS and HEMINGWAY. Generates task details for transparency and provides a task-specific URL for detailed analysis.

Instructions

Detect whether the text is AI-generated.Show to user the task detail url. Extract the taskId field, then concatenate the link in the following format: https://pre-www.text2go.ai/?utm_source=claude_mcp&taskId={taskId}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
detectionTypeListYes
textYes
typeYes

Implementation Reference

  • The execution handler for the 'detect' tool. It validates input using AiDetectArgumentSchema, calls the external API for AI text detection, and formats the response.
    if (name === "detect") {
      const argument = AiDetectArgumentSchema.parse(args);
    
      const detectUrl = `${API_BASE}/rewrite/text-detection`;
      const detectData = await makeRequest<AiDetectResponse>(detectUrl, argument);
    
      if (!detectData) {
        return {
          content: [
            {
              type: "text",
              text: "Failed to retrieve alerts data",
            },
          ],
        };
      }
    
      const responseData = {
        ...detectData
        ,text: undefined,
      };
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(responseData),
          },
        ],
      };
    } else {
  • JSON Schema definition for the 'detect' tool input, provided in tool registration.
    inputSchema: {
      type: "object",
      properties: {
        type: {
          type: "string",
          enum: ["original_text"],
        },
        text: {
          type: "string",
        },
        detectionTypeList: {
          type: "array",
          items: {
            type: "string",
            enum: ["COPYLEAKS", "HEMINGWAY"],
          },
        },
      },
      required: ["type", "text", "detectionTypeList"],
    },
  • Zod schema used internally to parse and validate arguments for the 'detect' tool.
    const AiDetectArgumentSchema = z
      .object({
        type: z.enum(["original_text"]),
        text: z.string(),
        detectionTypeList: z.array(
          z.enum(["COPYLEAKS", "HEMINGWAY"])
        ),
      })
      .required();
  • src/index.ts:35-64 (registration)
    Registration of the 'detect' tool in the ListToolsRequestSchema handler, including its name, description, and input schema.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
            {
                name: "detect",
                description: "Detect whether the text is AI-generated.Show to user the task detail url. Extract the taskId field, then concatenate the link in the following format: https://pre-www.text2go.ai/?utm_source=claude_mcp&taskId={taskId}",
                inputSchema: {
                  type: "object",
                  properties: {
                    type: {
                      type: "string",
                      enum: ["original_text"],
                    },
                    text: {
                      type: "string",
                    },
                    detectionTypeList: {
                      type: "array",
                      items: {
                        type: "string",
                        enum: ["COPYLEAKS", "HEMINGWAY"],
                      },
                    },
                  },
                  required: ["type", "text", "detectionTypeList"],
                },
              }
        ],
      };
    });
  • Utility function used by the detect handler to make POST requests to the detection API.
    async function makeRequest<T>(url: string, data?: any): Promise<T | null> {
      const headers = {
        "User-Agent": USER_AGENT,
        "Accept": "application/json",
        "Content-Type": "application/json"
      };
    
      try {
        const response = await fetch(url, {
          method: 'POST',
          headers,
          body: data ? JSON.stringify(data) : undefined
        });
        
        if (!response.ok) {
          throw new Error(`HTTP error! status: ${response.status}`);
        }
        return (await response.json()) as T;
      } catch (error) {
        console.error("Error making request:", error);
        return null;
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions showing a task detail URL and extracting/concatenating a taskId, which suggests this tool performs both detection AND URL generation. However, it doesn't disclose what happens after detection (e.g., returns a score, classification, confidence), whether it makes external API calls, rate limits, or authentication requirements.

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?

The description is poorly structured - it starts with the core purpose but immediately mixes in implementation details about URL formatting. The second sentence about extracting taskId and concatenating links feels like internal implementation instructions rather than a clear tool description. It's not front-loaded with essential information.

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?

For a 3-parameter detection tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns (just mentions showing a URL), doesn't clarify the detection mechanism, and doesn't provide context about the detectionTypeList options (COPYLEAKS vs HEMINGWAY). The URL formatting details seem like implementation noise rather than helpful context.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for undocumented parameters. The description mentions 'text' but doesn't explain what kind of text or length limits. It doesn't mention 'detectionTypeList' or 'type' parameters at all, leaving three parameters essentially unexplained beyond their schema definitions.

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 states 'Detect whether the text is AI-generated' which provides a basic purpose, but it's vague about the mechanism and immediately diverges into implementation details about URLs and task IDs. The title is null, and the description doesn't clearly distinguish this as a standalone detection tool versus part of a workflow.

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?

No guidance on when to use this tool is provided. The description jumps straight to implementation details without explaining the context, prerequisites, or alternatives. There's no mention of when this detection would be appropriate versus other methods.

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/Text2Go/ai-humanizer-mcp-server'

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