Skip to main content
Glama

Community

community

Query OfficeRnD community data including members, companies, check-ins, and visits using filters and pagination to retrieve specific information.

Instructions

Query community/people data in OfficeRnD.

action=list: List entities with optional filters and pagination (max 50 per page). action=get: Get a single entity by ID.

Entity-specific filters when listing:

  • members: status, email, name, company, location

  • companies: name, status, location

  • memberships: member, company, status

  • checkins: member, location, startAfter, startBefore (ISO dates — use these to get today's check-ins)

  • contracts: member, company, status

  • visits: location, startAfter, startBefore (ISO dates — use these to get today's visits)

  • visitors: (pagination only)

  • opportunities: status, member, company

  • opportunity_statuses: (pagination only, no get)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform
entityYesEntity type to query
idNoEntity ID (required for action=get)
statusNoFilter by status (members, companies, memberships, contracts, visits, opportunities)
emailNoFilter by email (members only)
nameNoFilter by exact full name, e.g. 'Yoan Reimers' not just 'Yoan' (members, companies)
memberNoFilter by member ID (memberships, checkins, contracts, opportunities)
companyNoFilter by company ID (members, memberships, contracts, opportunities)
locationNoFilter by location ID (members, companies, checkins, visits)
startAfterNoFilter visits/checkins starting on or after this ISO date (e.g. 2026-03-11T00:00:00.000Z)
startBeforeNoFilter visits/checkins starting before this ISO date (e.g. 2026-03-12T00:00:00.000Z)
cursorNextNoCursor token for next page of results
limitNoResults per page (max 50, default 50)

Implementation Reference

  • The asynchronous handler function for the 'community' tool that processes 'list' and 'get' actions.
      async ({ action, entity, id, status, email, name, member, company, location, startAfter, startBefore, cursorNext, limit }) => {
        try {
          const cfg = ENTITIES[entity];
    
          if (action === "get") {
            if (!cfg.getPath) {
              return {
                content: [{ type: "text" as const, text: `Entity "${entity}" does not support get by ID.` }],
                isError: true,
              };
            }
            if (!id) {
              return {
                content: [{ type: "text" as const, text: "id is required for action=get." }],
                isError: true,
              };
            }
            const item = await apiGet<Record<string, unknown>>(`${cfg.getPath}/${id}`);
            return { content: [{ type: "text" as const, text: cfg.formatter(item) }] };
          }
    
          // list
          const params: Record<string, string> = {};
          if (cursorNext) params["$cursorNext"] = cursorNext;
          if (limit) params["$limit"] = limit;
    
          if (status) params["status"] = status;
          if (email) params["email"] = email;
          if (name) params["name"] = name;
          if (member) params["member"] = member;
          if (company) params["company"] = company;
          if (location) params["location"] = location;
    
          if (entity === "visits" || entity === "checkins") {
            if (startAfter) params["start[$gte]"] = startAfter;
            if (startBefore) params["start[$lt]"] = startBefore;
          }
    
          const data = await apiGet<PaginatedResponse<Record<string, unknown>>>(cfg.listPath, params);
    
          if (data.results.length === 0) {
            return { content: [{ type: "text" as const, text: `No ${cfg.label} found.` }] };
          }
    
          const text = data.results.map(cfg.formatter).join("\n---\n");
          let result = `Found ${data.results.length} ${cfg.label} (range ${data.rangeStart}-${data.rangeEnd}):\n\n${text}`;
          if (data.cursorNext) {
            result += `\n\n[More results available — use cursorNext: "${data.cursorNext}"]`;
          }
    
          return { content: [{ type: "text" as const, text: result }] };
        } catch (error) {
          return {
            content: [
              {
                type: "text" as const,
                text: `Error querying ${entity}: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
            isError: true,
          };
        }
      }
    );
  • The registration function that defines the 'community' tool on the MCP server.
    export function registerCommunityTool(server: McpServer): void {
      server.registerTool(
        "community",
        {
          title: "Community",
          description: `Query community/people data in OfficeRnD.
    
    action=list: List entities with optional filters and pagination (max 50 per page).
    action=get: Get a single entity by ID.
    
    Entity-specific filters when listing:
    - members: status, email, name, company, location
    - companies: name, status, location
    - memberships: member, company, status
    - checkins: member, location, startAfter, startBefore (ISO dates — use these to get today's check-ins)
    - contracts: member, company, status
    - visits: location, startAfter, startBefore (ISO dates — use these to get today's visits)
    - visitors: (pagination only)
    - opportunities: status, member, company
    - opportunity_statuses: (pagination only, no get)`,
          inputSchema: {
            action: z.enum(["list", "get"]).describe("Action to perform"),
            entity: z
              .enum([
                "members",
                "companies",
                "memberships",
                "checkins",
                "contracts",
                "visits",
                "visitors",
                "opportunities",
                "opportunity_statuses",
              ])
              .describe("Entity type to query"),
            id: z
              .string()
              .optional()
              .describe("Entity ID (required for action=get)"),
            status: z
              .string()
              .optional()
              .describe("Filter by status (members, companies, memberships, contracts, visits, opportunities)"),
            email: z
              .string()
              .optional()
              .describe("Filter by email (members only)"),
            name: z
              .string()
              .optional()
              .describe("Filter by exact full name, e.g. 'Yoan Reimers' not just 'Yoan' (members, companies)"),
            member: z
              .string()
              .optional()
              .describe("Filter by member ID (memberships, checkins, contracts, opportunities)"),
            company: z
              .string()
              .optional()
              .describe("Filter by company ID (members, memberships, contracts, opportunities)"),
            location: z
              .string()
              .optional()
              .describe("Filter by location ID (members, companies, checkins, visits)"),
            startAfter: z
              .string()
              .optional()
              .describe("Filter visits/checkins starting on or after this ISO date (e.g. 2026-03-11T00:00:00.000Z)"),
            startBefore: z
              .string()
              .optional()
              .describe("Filter visits/checkins starting before this ISO date (e.g. 2026-03-12T00:00:00.000Z)"),
            cursorNext: z
              .string()
              .optional()
              .describe("Cursor token for next page of results"),
            limit: z
              .string()
              .optional()
              .describe("Results per page (max 50, default 50)"),
          },
        },
        async ({ action, entity, id, status, email, name, member, company, location, startAfter, startBefore, cursorNext, limit }) => {
          try {
            const cfg = ENTITIES[entity];
    
            if (action === "get") {
              if (!cfg.getPath) {
                return {
                  content: [{ type: "text" as const, text: `Entity "${entity}" does not support get by ID.` }],
                  isError: true,
                };
              }
              if (!id) {
                return {
                  content: [{ type: "text" as const, text: "id is required for action=get." }],
                  isError: true,
                };
              }
              const item = await apiGet<Record<string, unknown>>(`${cfg.getPath}/${id}`);
              return { content: [{ type: "text" as const, text: cfg.formatter(item) }] };
            }
    
            // list
            const params: Record<string, string> = {};
            if (cursorNext) params["$cursorNext"] = cursorNext;
            if (limit) params["$limit"] = limit;
    
            if (status) params["status"] = status;
            if (email) params["email"] = email;
            if (name) params["name"] = name;
            if (member) params["member"] = member;
            if (company) params["company"] = company;
            if (location) params["location"] = location;
    
            if (entity === "visits" || entity === "checkins") {
              if (startAfter) params["start[$gte]"] = startAfter;
              if (startBefore) params["start[$lt]"] = startBefore;
            }
    
            const data = await apiGet<PaginatedResponse<Record<string, unknown>>>(cfg.listPath, params);
    
            if (data.results.length === 0) {
              return { content: [{ type: "text" as const, text: `No ${cfg.label} found.` }] };
            }
    
            const text = data.results.map(cfg.formatter).join("\n---\n");
            let result = `Found ${data.results.length} ${cfg.label} (range ${data.rangeStart}-${data.rangeEnd}):\n\n${text}`;
            if (data.cursorNext) {
              result += `\n\n[More results available — use cursorNext: "${data.cursorNext}"]`;
            }
    
            return { content: [{ type: "text" as const, text: result }] };
          } catch (error) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: `Error querying ${entity}: ${error instanceof Error ? error.message : String(error)}`,
                },
              ],
              isError: true,
            };
          }
        }
      );
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, but description carries burden well: discloses pagination limits (max 50 per page), ISO date format requirements with examples, exact name matching constraints, and entity-specific operation restrictions (visitors only supports pagination). Missing explicit read-only safety declaration.

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?

Well-structured with clear sections for actions vs entity-specific filters. Front-loaded with purpose statement. Length is justified by the 9 entity types and their filter matrix, though the bullet list format is slightly verbose. No redundant or filler text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Comprehensive coverage of 13-parameter input space and entity-action logic compensates for missing output schema. Adequately addresses complexity without attempting to describe all possible return entity structures, which would be impractical. Missing annotations for safety/destructive hints.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 100% coverage, but description adds critical value: specific examples ('Yoan Reimers' not 'Yoan'), date usage patterns ('use these to get today's check-ins'), and reorganizes filter-entity mappings for readability. Adds semantic constraints beyond schema definitions.

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

Purpose5/5

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

Opens with specific verb 'Query' and clear resource 'community/people data in OfficeRnD'. Distinct from siblings (billing=financial, space=physical locations, settings=config) through explicit domain focus on people/entities like members, companies, and visits.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear internal guidance distinguishing 'list' (filters, pagination) from 'get' (single ID). Documents entity-specific filter availability and notes special cases (visitors/opportunity_statuses lack 'get' action). Lacks explicit cross-tool comparisons but domain separation from siblings is evident.

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

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/MrBoor/officernd-mcp'

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