{"openapi":"3.1.0","info":{"title":"IntenCheck MCP API","description":"MCP-facing schema for IntenCheck text analysis tools. Use https://intencheck.com/mcp as the MCP endpoint.","version":"1.1.0"},"paths":{"/api/v1/reply":{"post":{"summary":"Generate a reply or rewrite using IntenCheck analysis","description":"Generate a reply or rewrite from source text and IntenCheck analysis data. Use this MCP tool after analyze_text when a client wants to answer, soften, reframe, mirror, counterbalance, or custom-shape a message according to detected communication style and emotional signals. Requires an IntenCheck API key and consumes word balance based on the original text.","operationId":"generate_reply","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analyze/bulk":{"post":{"summary":"Analyze multiple texts in one request","description":"Analyze up to 100 texts with the same feature and output-language settings. Use this MCP tool for batches of reviews, messages, drafts, or conversation snippets when each item should receive its own IntenCheck analysis result. Requires an IntenCheck API key and consumes word balance for the combined submitted texts.","operationId":"analyze_text_bulk","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAnalyzeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompactBulkAnalyzeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analyze":{"post":{"summary":"Analyze one text for psychological communication signals","description":"Analyze one natural-language text and return structured IntenCheck signals such as NLP metaprograms, emotions, moods, communication styles, and tone/posture. Use this as the primary MCP tool when a client needs a rich psychological profile of a message, review, email, support conversation, or marketing copy. Requires an IntenCheck API key and consumes word balance based on the submitted text.","operationId":"analyze_text","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompactAnalyzeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/status":{"get":{"summary":"Check authenticated IntenCheck MCP readiness","description":"Return a lightweight authenticated readiness response for MCP clients. Use this tool before paid analysis calls to verify that authentication, routing, and the IntenCheck MCP runtime are usable. This endpoint does not call the LLM provider and does not consume word balance.","operationId":"mcp_status","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analyze/sentiment":{"post":{"summary":"Run focused sentiment analysis for one text","description":"Return a compact sentiment result with label, score, and explanation. Use this MCP tool when a client only needs the overall emotional polarity of the text instead of the full psychological profile. Requires an IntenCheck API key and consumes a smaller word-balance charge than full analysis.","operationId":"analyze_sentiment","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeSentimentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AnalyzeSentimentResponse":{"properties":{"analysis":{"$ref":"#/components/schemas/SentimentResult"}},"type":"object","required":["analysis"],"title":"AnalyzeSentimentResponse"},"SentimentResult":{"properties":{"sentiment":{"type":"string","title":"Sentiment","description":"Overall sentiment (Positive, Negative, Neutral)"},"score":{"type":"integer","title":"Score","description":"Score from 1 (very negative) to 10 (very positive)"},"explanation":{"type":"string","title":"Explanation","description":"Brief explanation of the sentiment"}},"type":"object","required":["sentiment","score","explanation"],"title":"SentimentResult"},"CompactBulkAnalyzeResponse":{"properties":{"r":{"items":{"$ref":"#/components/schemas/CompactAnalyzeResponse"},"type":"array","title":"R"}},"type":"object","required":["r"],"title":"CompactBulkAnalyzeResponse"},"CompactAnalyzeResponse":{"properties":{"a":{"$ref":"#/components/schemas/CompactAnalysisResult-Output"}},"type":"object","required":["a"],"title":"CompactAnalyzeResponse"},"CompactAnalysisResult-Output":{"properties":{"mp":{"anyOf":[{"$ref":"#/components/schemas/CompactMetaprograms"},{"type":"null"}]},"e":{"anyOf":[{"$ref":"#/components/schemas/CompactEmotions"},{"type":"null"}]},"m":{"anyOf":[{"$ref":"#/components/schemas/CompactMoods"},{"type":"null"}]},"cs":{"anyOf":[{"$ref":"#/components/schemas/CompactCommunicationStyles"},{"type":"null"}]},"tp":{"anyOf":[{"$ref":"#/components/schemas/CompactToneAndPosture"},{"type":"null"}]},"s":{"anyOf":[{"$ref":"#/components/schemas/SentimentResult"},{"type":"null"}]}},"type":"object","title":"CompactAnalysisResult"},"CompactMetaprograms":{"properties":{"ta":{"$ref":"#/components/schemas/CompactMetaprogramPair","description":"Toward vs Away"},"ie":{"$ref":"#/components/schemas/CompactMetaprogramPair","description":"Internal vs External"},"mm":{"$ref":"#/components/schemas/CompactMetaprogramPair","description":"Matching vs Mismatching"},"gs":{"$ref":"#/components/schemas/CompactMetaprogramPair","description":"Global vs Specific"},"op":{"$ref":"#/components/schemas/CompactMetaprogramPair","description":"Options vs Procedures"},"pn":{"$ref":"#/components/schemas/CompactMetaprogramPair","description":"Possibility vs Necessity"},"pr":{"$ref":"#/components/schemas/CompactMetaprogramPair","description":"Proactive vs Reactive"}},"type":"object","required":["ta","ie","mm","gs","op","pn","pr"],"title":"CompactMetaprograms"},"CompactMetaprogramPair":{"properties":{"ls":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ls","description":"Left side score"},"rs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rs","description":"Right side score"},"d":{"type":"boolean","title":"D","default":true}},"type":"object","title":"CompactMetaprogramPair"},"CompactCommunicationStyles":{"properties":{"ws":{"$ref":"#/components/schemas/CompactParameterScore","description":"Warm / Supportive"},"cd":{"$ref":"#/components/schemas/CompactParameterScore","description":"Cold / Distant"},"as":{"$ref":"#/components/schemas/CompactParameterScore","description":"Assertive"},"agg":{"$ref":"#/components/schemas/CompactParameterScore","description":"Aggressive"},"ps":{"$ref":"#/components/schemas/CompactParameterScore","description":"Passive"},"pag":{"$ref":"#/components/schemas/CompactParameterScore","description":"Passive-Aggressive"},"cdom":{"$ref":"#/components/schemas/CompactParameterScore","description":"Controlling / Dominant"},"aa":{"$ref":"#/components/schemas/CompactParameterScore","description":"Accommodating / Adaptive"}},"type":"object","required":["ws","cd","as","agg","ps","pag","cdom","aa"],"title":"CompactCommunicationStyles"},"CompactParameterScore":{"properties":{"v":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"V","description":"Score 1-10"},"d":{"type":"boolean","title":"D","description":"Detected","default":true}},"type":"object","title":"CompactParameterScore"},"CompactMoods":{"properties":{"up":{"$ref":"#/components/schemas/CompactParameterScore","description":"Uplifted / Playful"},"cn":{"$ref":"#/components/schemas/CompactParameterScore","description":"Calm / Neutral"},"irr":{"$ref":"#/components/schemas/CompactParameterScore","description":"Irritable"},"gd":{"$ref":"#/components/schemas/CompactParameterScore","description":"Gloomy / Depressed"},"wt":{"$ref":"#/components/schemas/CompactParameterScore","description":"Worried / Tense"},"cs":{"$ref":"#/components/schemas/CompactParameterScore","description":"Cynical / Skeptical"},"ei":{"$ref":"#/components/schemas/CompactParameterScore","description":"Enthusiastic / Inspired"},"ta":{"$ref":"#/components/schemas/CompactParameterScore","description":"Tired / Apathetic"}},"type":"object","required":["up","cn","irr","gd","wt","cs","ei","ta"],"title":"CompactMoods"},"CompactToneAndPosture":{"properties":{"gn":{"$ref":"#/components/schemas/CompactParameterScore","description":"Gentle"},"neu":{"$ref":"#/components/schemas/CompactParameterScore","description":"Neutral"},"hd":{"$ref":"#/components/schemas/CompactParameterScore","description":"Hard"},"ang":{"$ref":"#/components/schemas/CompactParameterScore","description":"Angry"},"mo":{"$ref":"#/components/schemas/CompactParameterScore","description":"Mocking"},"sar":{"$ref":"#/components/schemas/CompactParameterScore","description":"Sarcastic"},"iro":{"$ref":"#/components/schemas/CompactParameterScore","description":"Ironic"},"pat":{"$ref":"#/components/schemas/CompactParameterScore","description":"Patronizing"},"ac":{"$ref":"#/components/schemas/CompactParameterScore","description":"Affectionate / Caring"}},"type":"object","required":["gn","neu","hd","ang","mo","sar","iro","pat","ac"],"title":"CompactToneAndPosture"},"CompactEmotions":{"properties":{"js":{"$ref":"#/components/schemas/CompactParameterScore","description":"Joy / Satisfaction"},"cr":{"$ref":"#/components/schemas/CompactParameterScore","description":"Calm / Relaxation"},"ic":{"$ref":"#/components/schemas/CompactParameterScore","description":"Interest / Curiosity"},"sc":{"$ref":"#/components/schemas/CompactParameterScore","description":"Surprise / Confusion"},"sd":{"$ref":"#/components/schemas/CompactParameterScore","description":"Sadness / Disappointment"},"aif":{"$ref":"#/components/schemas/CompactParameterScore","description":"Anger / Irritation / Frustration"},"fat":{"$ref":"#/components/schemas/CompactParameterScore","description":"Fear / Anxiety / Tension"},"sga":{"$ref":"#/components/schemas/CompactParameterScore","description":"Shame / Guilt / Awkwardness"},"dc":{"$ref":"#/components/schemas/CompactParameterScore","description":"Disgust / Contempt"},"er":{"$ref":"#/components/schemas/CompactParameterScore","description":"Envy / Resentment"}},"type":"object","required":["js","cr","ic","sc","sd","aif","fat","sga","dc","er"],"title":"CompactEmotions"},"ReplyRequest":{"properties":{"original_text":{"type":"string","minLength":1,"title":"Original Text","description":"Source text that should be answered or rewritten. The request is billed by this text's word count."},"analysis_data":{"$ref":"#/components/schemas/CompactAnalysisResult-Input","description":"Analysis result for the original text. Usually pass the output from analyze_text so the reply generator can align tone, emotion, and style."},"strategy":{"type":"string","enum":["analogous","opposite","analogous_plus_vector","custom"],"title":"Strategy","description":"Reply strategy. 'analogous' mirrors the detected style, 'opposite' counterbalances it, 'analogous_plus_vector' follows vector_instructions, and 'custom' follows custom_parameters."},"mode":{"type":"string","enum":["reply","rewrite"],"title":"Mode","description":"'reply' generates an answer; 'rewrite' rewrites the original text.","default":"reply"},"vector_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vector Instructions","description":"Additional direction used only with strategy='analogous_plus_vector'."},"custom_parameters":{"anyOf":[{"$ref":"#/components/schemas/CustomParameters"},{"type":"null"}],"description":"Target tone, mood, style, or metaprogram settings used only with strategy='custom'."},"target_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Language","description":"Optional ISO 639-1 output language. If omitted, the generated text uses the source text's language."}},"type":"object","required":["original_text","analysis_data","strategy"],"title":"ReplyRequest","examples":[{"analysis_data":{"emotions":{"anger_irritation_frustration":{"detected":true,"value":9},"calm_relaxation":{"detected":false,"value":1}}},"custom_parameters":{"target_communication_style":"Assertive","target_tone":"Neutral"},"mode":"rewrite","original_text":"I will not accept these terms under any condition.","strategy":"custom"}]},"CustomParameters":{"properties":{"target_tone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Tone","description":"Desired tone for the generated reply or rewrite."},"target_mood":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Mood","description":"Desired emotional mood for the generated reply or rewrite."},"target_communication_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Communication Style","description":"Desired communication style, such as assertive, warm, neutral, or diplomatic."},"metaprograms":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Metaprograms","description":"Optional target metaprogram adjustments keyed by metaprogram name."}},"type":"object","title":"CustomParameters"},"CompactAnalysisResult-Input":{"properties":{"mp":{"anyOf":[{"$ref":"#/components/schemas/CompactMetaprograms"},{"type":"null"}]},"e":{"anyOf":[{"$ref":"#/components/schemas/CompactEmotions"},{"type":"null"}]},"m":{"anyOf":[{"$ref":"#/components/schemas/CompactMoods"},{"type":"null"}]},"cs":{"anyOf":[{"$ref":"#/components/schemas/CompactCommunicationStyles"},{"type":"null"}]},"tp":{"anyOf":[{"$ref":"#/components/schemas/CompactToneAndPosture"},{"type":"null"}]},"s":{"anyOf":[{"$ref":"#/components/schemas/SentimentResult"},{"type":"null"}]}},"type":"object","title":"CompactAnalysisResult"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"McpStatusResponse":{"properties":{"status":{"type":"string","const":"ok","title":"Status","description":"Operational MCP status."},"service":{"type":"string","title":"Service","description":"Human-readable service name."},"authenticated":{"type":"boolean","title":"Authenticated","description":"Whether the request passed IntenCheck authentication."},"account_id":{"type":"integer","title":"Account Id","description":"Authenticated IntenCheck account ID."},"mcp_endpoint":{"type":"string","title":"Mcp Endpoint","description":"Public MCP endpoint clients should use."},"docs_url":{"type":"string","title":"Docs Url","description":"Public MCP integration documentation URL."},"checked_at":{"type":"string","format":"date-time","title":"Checked At","description":"UTC timestamp when this status response was produced."}},"type":"object","required":["status","service","authenticated","account_id","mcp_endpoint","docs_url","checked_at"],"title":"McpStatusResponse"},"ReplyResponse":{"properties":{"generated_reply":{"type":"string","title":"Generated Reply"}},"type":"object","required":["generated_reply"],"title":"ReplyResponse"},"BulkAnalyzeRequest":{"properties":{"texts":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Texts","description":"Array of texts to analyze in one request. Each item is billed by word count. Keep items short enough for the account's available balance."},"features":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Features","description":"Optional feature families to include for every text. Supported values: metaprograms, emotions, moods, communication_styles, tone_and_posture. Omit this field to run the full analysis."},"output_lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Lang","description":"ISO 639-1 language code for labels and explanations in the response, for example 'en', 'lt', 'fr', or 'de'. Defaults to Lithuanian ('lt').","default":"lt"}},"type":"object","required":["texts"],"title":"BulkAnalyzeRequest","examples":[{"features":["emotions"],"output_lang":"en","texts":["I am so frustrated that you never listen to my feedback!","Thank you so much for the unexpected bonus, it made my day!"]}]},"AnalyzeRequest":{"properties":{"text":{"type":"string","minLength":1,"title":"Text","description":"Text to analyze. Use natural-language user text, review text, messages, email copy, support conversations, or other customer-facing copy. The request is billed by word count."},"features":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Features","description":"Optional feature families to include. Supported values: metaprograms, emotions, moods, communication_styles, tone_and_posture. Omit this field to run the full analysis."},"output_lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Lang","description":"ISO 639-1 language code for labels and explanations in the response, for example 'en', 'lt', 'fr', or 'de'. Defaults to Lithuanian ('lt').","default":"lt"}},"type":"object","required":["text"],"title":"AnalyzeRequest","examples":[{"features":["emotions","communication_styles"],"output_lang":"en","text":"I am so frustrated that you never listen to my feedback!"}]}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/v1/auth/login"}}}}}}