// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { Metadata, asTextContentResult } from './types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; export const metadata: Metadata = { resource: 'all', operation: 'read', tags: [] }; export const tool: Tool = { name: 'get_agentic_help', description: 'Ask a dedicated agent for help with your specific query or use-case, and\nget a tailor-made guide on how to accomplish it.', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'What you need help with. This can be a description of your problem, goal, or anything else that would be helpful.', }, sdk: { type: 'object', description: 'The SDK details to get help with.', properties: { language: { type: 'string', description: 'The language of the SDK.', }, version: { type: 'string', description: 'The version of the SDK.', }, }, required: ['language'], }, additionalContext: { type: 'object', description: 'Additional information that you can share.', properties: { code: { type: 'string', description: 'The code that you need help with.', }, intent: { type: 'string', description: 'The goal the code should achieve.', }, lsp: { type: 'string', description: 'Any LSP-related information that is relevant.', }, errors: { type: 'string', description: 'Any error messages from the code.', }, }, }, }, required: ['query', 'sdk'], }, annotations: { readOnlyHint: true, }, }; const getAgenticHelpUrl = process.env['AGENTIC_HELP_URL'] || 'https://api.stainless.com/api/ai/get-agentic-help'; export const handler = async (_: unknown, args: any) => { const body = { ...args, sdk: { ...args.sdk, project: 'pylon-api' } }; const result = await fetch(getAgenticHelpUrl, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(body), }); return asTextContentResult(await result.json()); }; export default { metadata, tool, handler };