Skip to main content
Glama

get_initial_context

Retrieve usage instructions and Offorte context to initialize the proposal software environment 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

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • The primary implementation of the get_initial_context tool, including its name, description, empty parameters schema, annotations, and the execute handler function that constructs and returns the initial context string using imported INSTRUCTIONS and config.
    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; }, };
  • Tool registration: imports getInitialContextTool (line 3, not shown), includes it in the tools array, applies initialContextGuard, and registers all tools to the FastMCP server.
    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 guard function applied to all tools during registration. For get_initial_context, it sets a flag on execution. For other tools, it enforces that the flag is set first by throwing an error otherwise.
    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