Skip to main content
Glama

check_manipulation

Analyze text for manipulation tactics across cultural contexts. Identify and validate ethical information using multiple frameworks to detect credibility issues.

Instructions

Check for manipulation tactics across different cultural contexts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to analyze for manipulation

Implementation Reference

  • The core handler logic for the 'check_manipulation' tool. It uses regex patterns to detect manipulation tactics (emotional appeals, social proof, false authority, scarcity) in the input text and generates customized validation prompts recommending searches across MCP tools like Exa, Brave, ArXiv, and Google Scholar.
    if (name === "check_manipulation") {
      const patterns = {
        emotional: /fear|urgent|must act|limited time|don't wait|before it's too late/i,
        social: /everyone knows|nobody wants|you don't want to be|don't miss out/i,
        authority: /experts say|scientists claim|studies show|research proves/i,
        scarcity: /limited time|exclusive|rare opportunity|don't miss out/i
      };
    
      const detectedPatterns = Object.entries(patterns)
        .filter(([_, pattern]) => pattern.test(args.text))
        .map(([type]) => type);
    
      // Generate validation prompts
      const validationPrompts = [
        `- Use Exa MCP server to search for factual information: "${args.text}"`,
        `- Use Brave Search for independent fact-checking: "${args.text}"`,
        `- Search ArXiv for technical analysis: "${args.text}"`,
        `- Use Google Scholar MCP server to find peer-reviewed research: "${args.text}"`,
        `- Cross-reference findings across different platforms to establish truth`
      ];
    
      if (detectedPatterns.includes("authority")) {
        validationPrompts.push(
          `- Use Google Scholar MCP server to verify credibility of cited authorities`,
          `- Cross-reference authority claims with independent research`,
          `- Compare expert opinions across different fields`
        );
      }
    
      if (detectedPatterns.includes("emotional")) {
        validationPrompts.push(
          `- Use Exa MCP server to find balanced, non-emotional discussions`,
          `- Compare emotional appeals with empirical evidence`,
          `- Cross-validate claims across multiple neutral sources`
        );
      }
    
      if (detectedPatterns.includes("social") || detectedPatterns.includes("scarcity")) {
        validationPrompts.push(
          `- Verify claims using multiple independent sources`,
          `- Cross-reference marketing claims with factual data`,
          `- Compare urgency claims with historical patterns`
        );
      }
    
      return {
        content: [
          {
            type: "text",
            text: `Manipulation check results:\n\n` +
                 `Detected patterns: ${detectedPatterns.join(", ") || "None"}\n\n` +
                 `Suggested validation:\n${validationPrompts.join("\n")}`
          },
          {
            type: "text",
            text: JSON.stringify({
              detectedPatterns,
              validationPrompts
            }, null, 2)
          }
        ],
      };
    }
  • Tool registration in ListTools response, including name, description, and input schema definition requiring a 'text' string parameter.
    {
      name: "check_manipulation",
      description: "Check for manipulation tactics across different cultural contexts",
      inputSchema: {
        type: "object",
        properties: {
          text: {
            type: "string",
            description: "Text to analyze for manipulation",
          }
        },
        required: ["text"],
      },
    }
  • src/index.ts:22-22 (registration)
    Capability declaration enabling the 'check_manipulation' tool in the MCP server configuration.
    check_manipulation: true
  • src/index.ts:32-89 (registration)
    Registration of the ListTools handler that exposes the 'check_manipulation' tool details including schema.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          {
            name: "analyze_claim",
            description: "Analyze a claim using multiple epistemological frameworks and suggest validation steps",
            inputSchema: {
              type: "object",
              properties: {
                text: {
                  type: "string",
                  description: "Claim to analyze",
                },
                framework: {
                  type: "string",
                  description: "Validation framework to use (empirical, responsible, harmonic, or pluralistic)",
                  enum: ["empirical", "responsible", "harmonic", "pluralistic"],
                }
              },
              required: ["text"],
            },
          },
          {
            name: "validate_sources",
            description: "Validate sources and evidence using configured framework",
            inputSchema: {
              type: "object",
              properties: {
                text: {
                  type: "string",
                  description: "Text containing claims and sources to validate",
                },
                framework: {
                  type: "string",
                  description: "Validation framework to use",
                  enum: ["empirical", "responsible", "harmonic", "pluralistic"],
                }
              },
              required: ["text"],
            },
          },
          {
            name: "check_manipulation",
            description: "Check for manipulation tactics across different cultural contexts",
            inputSchema: {
              type: "object",
              properties: {
                text: {
                  type: "string",
                  description: "Text to analyze for manipulation",
                }
              },
              required: ["text"],
            },
          }
        ],
      };
    });
  • src/index.ts:97-327 (registration)
    Registration of the CallTool handler that dispatches to the specific check_manipulation implementation.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: rawArgs } = request.params;
      const args = rawArgs as unknown as ToolArguments;
    
      if (!args || typeof args.text !== 'string') {
        throw new McpError(ErrorCode.InvalidParams, "Text parameter is required and must be a string");
      }
    
      try {
        if (name === "analyze_claim") {
          const framework: keyof typeof VALIDATION_FRAMEWORKS = 
            (typeof args.framework === 'string' && args.framework in VALIDATION_FRAMEWORKS) 
              ? args.framework as keyof typeof VALIDATION_FRAMEWORKS 
              : VALIDATION_FRAMEWORK;
          const validation = validateWithFramework(args.text, framework, {
            hasEmpirical: /evidence|study|research|data/i.test(args.text),
            servesWellbeing: /benefit|improve|help|support/i.test(args.text),
            maintainsHarmony: /balance|harmony|integrate/i.test(args.text)
          });
    
          const suggestions = getValidationSuggestions(args.text, framework);
          
          // Generate cross-referencing prompts
          const crossRefPrompts = [
            `- Use Exa MCP server to search for general information: "${args.text}"`,
            `- Use Brave Search for independent web sources: "${args.text}"`,
            `- Search ArXiv for preprints and technical papers: "${args.text}"`,
            `- Use Google Scholar MCP server to find peer-reviewed research: "${args.text}"`,
            `- Cross-reference findings between academic and general sources to identify consensus or conflicts`
          ];
    
          // Framework-specific cross-references
          if (framework === "empirical" || framework === "pluralistic") {
            crossRefPrompts.push(
              `- Compare methodologies between ArXiv papers and peer-reviewed research`,
              `- Analyze replication status across different studies`,
              `- Cross-validate findings between academic databases`
            );
          }
    
          if (framework === "responsible" || framework === "pluralistic") {
            crossRefPrompts.push(
              `- Use Exa MCP server to search for community impact studies: "${args.text}"`,
              `- Cross-reference academic findings with community experiences`,
              `- Compare traditional knowledge with modern research findings`
            );
          }
    
          if (framework === "harmonic" || framework === "pluralistic") {
            crossRefPrompts.push(
              `- Use Exa MCP server to search for alternative perspectives: "${args.text}"`,
              `- Compare Eastern and Western research approaches`,
              `- Synthesize findings across different knowledge systems`
            );
          }
    
          return {
            content: [
              {
                type: "text",
                text: `Analysis using ${framework} framework:\n\n` +
                     `Requirements:\n${suggestions.join("\n")}\n\n` +
                     `Confidence level: ${validation.confidence}\n\n` +
                     `Suggested cross-references:\n${crossRefPrompts.join("\n")}`
              },
              {
                type: "text",
                text: JSON.stringify({
                  framework,
                  validation,
                  suggestions,
                  crossRefPrompts
                })
              }
            ],
          };
        }
    
        if (name === "validate_sources") {
          const framework: keyof typeof VALIDATION_FRAMEWORKS = 
            (typeof args.framework === 'string' && args.framework in VALIDATION_FRAMEWORKS) 
              ? args.framework as keyof typeof VALIDATION_FRAMEWORKS 
              : VALIDATION_FRAMEWORK;
          
          // Extract sources
          const sourcePattern = /according to|cited by|reported by|study by|research by|experts|scientists/gi;
          const sources = [];
          let match: RegExpExecArray | null;
          while ((match = sourcePattern.exec(args.text)) !== null) {
            const context = args.text.substring(
              Math.max(0, match.index - 30),
              Math.min(args.text.length, match.index + 70)
            );
            sources.push({
              type: "citation",
              context: context.trim()
            });
          }
    
          // Generate validation prompts for each source
          const validationPrompts = sources.flatMap((source: { type: string; context: string }) => {
            const basePrompts = [
              `- Use Exa MCP server to verify credibility of: "${source.context}"`,
              `- Use Brave Search to find independent verification: "${source.context}"`,
              `- Search ArXiv for related technical papers: "${source.context}"`,
              `- Use Google Scholar MCP server to check academic citations: "${source.context}"`,
              `- Cross-reference findings between different platforms to establish credibility`
            ];
    
            if (framework === "empirical" || framework === "pluralistic") {
              basePrompts.push(
                `- Compare methodologies and results across different studies`,
                `- Verify replication status and reproducibility`,
                `- Cross-validate findings between different research groups`
              );
            }
    
            if (framework === "responsible" || framework === "pluralistic") {
              basePrompts.push(
                `- Use Exa MCP server to search for community perspectives: "${source.context}"`,
                `- Compare academic findings with real-world impacts`,
                `- Cross-reference with local knowledge and experiences`
              );
            }
    
            if (framework === "harmonic" || framework === "pluralistic") {
              basePrompts.push(
                `- Compare perspectives across different cultural contexts`,
                `- Synthesize findings from multiple knowledge systems`,
                `- Identify areas of consensus and divergence`
              );
            }
    
            return basePrompts;
          });
    
          return {
            content: [
              {
                type: "text",
                text: `Source validation using ${framework} framework:\n\n` +
                     `Found ${sources.length} sources to validate.\n\n` +
                     `Validation steps:\n${validationPrompts.join("\n")}`
              },
              {
                type: "text",
                text: JSON.stringify({
                  framework,
                  sources,
                  validationPrompts
                }, null, 2)
              }
            ],
          };
        }
    
        if (name === "check_manipulation") {
          const patterns = {
            emotional: /fear|urgent|must act|limited time|don't wait|before it's too late/i,
            social: /everyone knows|nobody wants|you don't want to be|don't miss out/i,
            authority: /experts say|scientists claim|studies show|research proves/i,
            scarcity: /limited time|exclusive|rare opportunity|don't miss out/i
          };
    
          const detectedPatterns = Object.entries(patterns)
            .filter(([_, pattern]) => pattern.test(args.text))
            .map(([type]) => type);
    
          // Generate validation prompts
          const validationPrompts = [
            `- Use Exa MCP server to search for factual information: "${args.text}"`,
            `- Use Brave Search for independent fact-checking: "${args.text}"`,
            `- Search ArXiv for technical analysis: "${args.text}"`,
            `- Use Google Scholar MCP server to find peer-reviewed research: "${args.text}"`,
            `- Cross-reference findings across different platforms to establish truth`
          ];
    
          if (detectedPatterns.includes("authority")) {
            validationPrompts.push(
              `- Use Google Scholar MCP server to verify credibility of cited authorities`,
              `- Cross-reference authority claims with independent research`,
              `- Compare expert opinions across different fields`
            );
          }
    
          if (detectedPatterns.includes("emotional")) {
            validationPrompts.push(
              `- Use Exa MCP server to find balanced, non-emotional discussions`,
              `- Compare emotional appeals with empirical evidence`,
              `- Cross-validate claims across multiple neutral sources`
            );
          }
    
          if (detectedPatterns.includes("social") || detectedPatterns.includes("scarcity")) {
            validationPrompts.push(
              `- Verify claims using multiple independent sources`,
              `- Cross-reference marketing claims with factual data`,
              `- Compare urgency claims with historical patterns`
            );
          }
    
          return {
            content: [
              {
                type: "text",
                text: `Manipulation check results:\n\n` +
                     `Detected patterns: ${detectedPatterns.join(", ") || "None"}\n\n` +
                     `Suggested validation:\n${validationPrompts.join("\n")}`
              },
              {
                type: "text",
                text: JSON.stringify({
                  detectedPatterns,
                  validationPrompts
                }, null, 2)
              }
            ],
          };
        }
    
        throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
      } catch (error: unknown) {
        if (error instanceof McpError) {
          throw error;
        }
        throw new McpError(
          ErrorCode.InternalError,
          `Error analyzing text: ${(error instanceof Error ? error.message : String(error)) as string}`
        );
      }
    });
Behavior2/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. It mentions checking for manipulation tactics across cultural contexts, but doesn't describe what the tool actually does behaviorally—such as whether it returns a score, categories of manipulation, examples, or any limitations like accuracy, rate limits, or authentication needs. This leaves significant gaps in understanding the tool's operation.

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

Conciseness4/5

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

The description is a single, efficient sentence that directly states the tool's function. It's appropriately sized and front-loaded with the core purpose, though it could be slightly more structured by explicitly mentioning the input parameter or output expectations to improve clarity without adding unnecessary 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 the tool's complexity (analyzing manipulation across cultures) and lack of annotations or output schema, the description is incomplete. It doesn't explain what the tool returns, how results are formatted, any limitations in cultural coverage, or behavioral traits. This makes it inadequate for an agent to fully understand and use the tool effectively, especially without structured output information.

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, with the 'text' parameter clearly documented as 'Text to analyze for manipulation'. The description adds no additional meaning beyond this, as it doesn't elaborate on parameter usage, format expectations, or cultural context implications. With high schema coverage, the baseline score of 3 is appropriate, as the schema adequately handles parameter semantics without description enhancement.

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

Purpose3/5

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

The description states the tool's purpose as checking for manipulation tactics, which is clear but vague. It specifies 'across different cultural contexts' which adds some nuance, but doesn't clearly distinguish this from sibling tools like 'analyze_claim' or 'validate_sources' in terms of what specific manipulation tactics it detects or how it differs from general claim analysis or source validation.

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 explicit guidance on when to use this tool versus alternatives like 'analyze_claim' or 'validate_sources' is provided. The description implies usage for analyzing text for manipulation in cultural contexts, but lacks any context on prerequisites, exclusions, or comparative advantages over sibling tools, leaving the agent to infer when this specific tool is appropriate.

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/bmorphism/anti-bullshit-mcp-server'

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