Skip to main content
Glama

get_initial_context

Initialize the Offorte Proposal Software MCP server by retrieving usage instructions and essential context before accessing other tools.

Instructions

IMPORTANT: This tool must be called before using any other tools. It will get usage instructions & Offorte context for this MCP server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler for the 'get_initial_context' tool. Defines the tool object with name, description, empty parameters, annotations, and the execute function that constructs and returns the initial context string including instructions, account name, and current date.
    export const getInitialContextTool: Tool<undefined, typeof parameters> = { name: 'get_initial_context', description: `IMPORTANT: This tool must be called before using any other tools. It will get usage instructions & Offorte context for this MCP server.`, parameters, annotations: { title: 'Get MCP Server Instructions', openWorldHint: false, }, async execute() { const currentDate = new Date().toLocaleDateString('en-US'); const context = outdent` ${INSTRUCTIONS} Context for your Offorte instance: <context> Account Name: ${config.accountName} Date today: ${currentDate} </content> `; return context; }, };
  • Zod schema definition for empty object parameters, aliased as 'parameters' and used in the get_initial_context tool.
    export const emptyObject = z.object({});
  • Registers the getInitialContextTool (imported earlier at line 3) by including it in the tools array and adding all tools to the FastMCP server instance with the initialContextGuard wrapper.
    const tools = [ getInitialContextTool, getAccountUsersTool, getAutomationSetsTool, getContactDetailsTool, getDesignTemplatesTool, getEmailTemplatesTool, getProposalDirectoriesTool, getProposalTemplatesTool, getTextTemplatesTool, searchContactOrganisationsTool, searchContactPeopleTool, searchProposalsTool, createContactTool, createProposalTool, sendProposalTool, ]; export function registerTools({ server }: { server: FastMCP }) { (tools as unknown as FastMCPTool<Record<string, unknown>, ToolParameters>[]).map(initialContextGuard).forEach((tool) => server.addTool(tool)); }
  • Helper function that wraps tool execute methods to enforce calling 'get_initial_context' first before other tools, setting a flag upon its execution.
    export function initialContextGuard(tool: FastMCPTool<any, ToolParameters>): typeof tool { if (tool.name === 'get_initial_context') { return { ...tool, execute: async (args: any, context: Context<any>) => { initialContextSet = true; return tool.execute(args, context); }, }; } return { ...tool, execute: async (args: any, context: Context<any>) => { if (!initialContextSet) { throw new Error('Initial context has not been set. You must call get_initial_context before using this tool.'); } return tool.execute(args, context); }, }; }

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/offorte/offorte-mcp-server'

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